Bug 36581 - Checkouts table on patron account won't load if any of the items have item notes
Summary: Checkouts table on patron account won't load if any of the items have item notes
Status: Needs documenting
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Emily Lamancusa
QA Contact: Testopia
URL:
Keywords:
Depends on: 35506
Blocks:
  Show dependency treegraph
 
Reported: 2024-04-11 14:51 UTC by Emily Lamancusa
Modified: 2024-05-23 12:35 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00
Circulation function:


Attachments
Bug 36581: Define ymd in scope for checkouts table (1.37 KB, patch)
2024-04-11 15:05 UTC, Emily Lamancusa
Details | Diff | Splinter Review
Bug 36581: Define ymd in scope for checkouts table (1.44 KB, patch)
2024-04-11 15:08 UTC, Emily Lamancusa
Details | Diff | Splinter Review
Bug 36581: Define ymd in scope for checkouts table (1.49 KB, patch)
2024-04-11 15:54 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Emily Lamancusa 2024-04-11 14:51:14 UTC
The checkouts table hangs if any of the checked-out items have public or nonpublic notes, and causes a console error: Uncaught ReferenceError: ymd is not defined

ymd is defined in document ready - presumably this broke when the checkouts table got refactored into its own function.
Comment 1 Emily Lamancusa 2024-04-11 15:05:36 UTC
Created attachment 164760 [details] [review]
Bug 36581: Define ymd in scope for checkouts table

Test plan:
1. Find or create an item with a public or nonpublic note
   (in KTD default data, items on biblionumber 12 have notes already)
2. Check the item out to a patron
--> Checkouts table loading never completes
--> Browser console shows: "Uncaught ReferenceError: ymd is not defined"
3. Apply patch and clear browser cache
4. Refresh the page
--> Checkout table loads and console error is gone
Comment 2 Emily Lamancusa 2024-04-11 15:08:00 UTC
Created attachment 164761 [details] [review]
Bug 36581: Define ymd in scope for checkouts table

Test plan:
1. Find or create an item with a public or nonpublic note
   (in KTD default data, items on biblionumber 12 have notes already)
2. Check the item out to a patron
--> Checkouts table loading never completes
--> Browser console shows: "Uncaught ReferenceError: ymd is not defined"
3. Apply patch and clear browser cache
4. Refresh the page
--> Checkout table loads and console error is gone

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Comment 3 Emily Lamancusa 2024-04-11 15:08:46 UTC
Trivial one-line patch - self-SO
Comment 4 Nick Clemens (kidclamp) 2024-04-11 15:54:41 UTC
Created attachment 164775 [details] [review]
Bug 36581: Define ymd in scope for checkouts table

Test plan:
1. Find or create an item with a public or nonpublic note
   (in KTD default data, items on biblionumber 12 have notes already)
2. Check the item out to a patron
--> Checkouts table loading never completes
--> Browser console shows: "Uncaught ReferenceError: ymd is not defined"
3. Apply patch and clear browser cache
4. Refresh the page
--> Checkout table loads and console error is gone

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 5 Nick Clemens (kidclamp) 2024-04-11 15:56:42 UTC
I suspect this is from the CSRF, but we should test this in older versions or uncover the fault
Comment 6 Emily Lamancusa 2024-04-11 16:20:54 UTC
(In reply to Nick Clemens from comment #5)
> I suspect this is from the CSRF, but we should test this in older versions
> or uncover the fault

I think it's bug 35506. I'll test and confirm.
Comment 7 Emily Lamancusa 2024-04-11 20:11:37 UTC
(In reply to Emily Lamancusa from comment #6)
> (In reply to Nick Clemens from comment #5)
> > I suspect this is from the CSRF, but we should test this in older versions
> > or uncover the fault
> 
> I think it's bug 35506. I'll test and confirm.

Confirmed - I'll add it a dependency.
Comment 8 Katrin Fischer 2024-04-12 09:28:35 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 9 Fridolin Somers 2024-05-23 12:35:46 UTC
Depends on Bug 35506 not in 23.11.x