Bug 30911

Summary: Datatables error on course-details.pl after adding a bib-level course reserve
Product: Koha Reporter: Lucas Gass (lukeg) <lucas>
Component: ToolsAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: arthur.suzuki, martin.renvoize, victor
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00, 22.05.04, 21.11.11
Circulation function:
Bug Depends on: 14237    
Bug Blocks:    
Attachments: Bug 30911: Datatables error on course-details.pl after adding a bib-level course reserve
Bug 30911: Datatables error on course-details.pl after adding a bib-level course reserve
Bug 30911: Datatables error on course-details.pl after adding a bib-level course reserve

Description Lucas Gass (lukeg) 2022-06-06 22:02:33 UTC
To recreate:

1. Go to course resereves, add a course.
2. Go to the course and add a reserve at the bib-level ( use biblionumber of a bibliographic record )
3. Notice the normal DataTable controls are missing and if you look at the browser console you will see an error:

Uncaught TypeError: i is undefined
Comment 1 Lucas Gass (lukeg) 2022-06-06 22:42:24 UTC
This is due to the way DataTables supports colspans.
Comment 2 Owen Leonard 2022-07-08 13:27:35 UTC
Created attachment 137413 [details] [review]
Bug 30911: Datatables error on course-details.pl after adding a bib-level course reserve

This patch removes the colspan from biblio-level course reserves rows in
favor of adding a style to the message's container allowing it to
overflow across table cells.

To test, apply the patch and go to course reserves.

1. If necessary, add a new course.
2. View the details of the course and add a reserve using the
   biblionumber option to add the reserve at the bibliographic level.
3. Add a notes if you want, then click "Save."
4. Return to the course detail view.
5. In the table of reserves your biblio-level reserve should have a
   message starting in the "Barcode" column and overflowing across other
   item information columns, "Item information is not available for
   record-level course reserve."
6. Try adding multiple item-level and biblio-level reserves to the same
   course to confirm that the information displays well in those cases.
Comment 3 Katrin Fischer 2022-07-08 14:33:26 UTC
Created attachment 137426 [details] [review]
Bug 30911: Datatables error on course-details.pl after adding a bib-level course reserve

This patch removes the colspan from biblio-level course reserves rows in
favor of adding a style to the message's container allowing it to
overflow across table cells.

To test, apply the patch and go to course reserves.

1. If necessary, add a new course.
2. View the details of the course and add a reserve using the
   biblionumber option to add the reserve at the bibliographic level.
3. Add a notes if you want, then click "Save."
4. Return to the course detail view.
5. In the table of reserves your biblio-level reserve should have a
   message starting in the "Barcode" column and overflowing across other
   item information columns, "Item information is not available for
   record-level course reserve."
6. Try adding multiple item-level and biblio-level reserves to the same
   course to confirm that the information displays well in those cases.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 4 Katrin Fischer 2022-07-08 14:34:20 UTC
Thanks a lot, Owen!
Comment 5 Martin Renvoize (ashimema) 2022-07-08 14:36:47 UTC
Created attachment 137427 [details] [review]
Bug 30911: Datatables error on course-details.pl after adding a bib-level course reserve

This patch removes the colspan from biblio-level course reserves rows in
favor of adding a style to the message's container allowing it to
overflow across table cells.

To test, apply the patch and go to course reserves.

1. If necessary, add a new course.
2. View the details of the course and add a reserve using the
   biblionumber option to add the reserve at the bibliographic level.
3. Add a notes if you want, then click "Save."
4. Return to the course detail view.
5. In the table of reserves your biblio-level reserve should have a
   message starting in the "Barcode" column and overflowing across other
   item information columns, "Item information is not available for
   record-level course reserve."
6. Try adding multiple item-level and biblio-level reserves to the same
   course to confirm that the information displays well in those cases.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize (ashimema) 2022-07-08 14:38:27 UTC
Working as expected.. Passing QA
Comment 7 Tomás Cohen Arazi (tcohen) 2022-07-08 18:35:49 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 8 Lucas Gass (lukeg) 2022-08-12 16:56:02 UTC
Backported to 22.05.x for 22.05.04
Comment 9 Arthur Suzuki 2022-08-16 13:15:26 UTC
applied to 21.11.x for 21.11.11
Comment 10 Victor Grousset/tuxayo 2022-08-19 23:16:46 UTC
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed.

Nothing to document, marking resolved.
Comment 11 Katrin Fischer 2022-08-20 08:32:33 UTC
(In reply to Victor Grousset/tuxayo from comment #10)
> Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed.
> 
> Nothing to document, marking resolved.

Dependency is not in 21.11.