Bug 30911 - Datatables error on course-details.pl after adding a bib-level course reserve
Summary: Datatables error on course-details.pl after adding a bib-level course reserve
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 14237
Blocks:
  Show dependency treegraph
 
Reported: 2022-06-06 22:02 UTC by Lucas Gass
Modified: 2023-06-08 22:26 UTC (History)
3 users (show)

See Also:
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


Attachments
Bug 30911: Datatables error on course-details.pl after adding a bib-level course reserve (4.22 KB, patch)
2022-07-08 13:27 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 30911: Datatables error on course-details.pl after adding a bib-level course reserve (4.27 KB, patch)
2022-07-08 14:33 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 30911: Datatables error on course-details.pl after adding a bib-level course reserve (4.34 KB, patch)
2022-07-08 14:36 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass 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 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 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 2022-07-08 14:38:27 UTC
Working as expected.. Passing QA
Comment 7 Tomás Cohen Arazi 2022-07-08 18:35:49 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 8 Lucas Gass 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.