Bug 40899

Summary: When placing multiple holds at once the individual "Pickup location:" dropdowns do not update when changing the top level "Pickup at:" dropdown"
Product: Koha Reporter: Lucas Gass (lukeg) <lucas>
Component: CirculationAssignee: Lucas Gass (lukeg) <lucas>
Status: Pushed to oldstable --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: alex, anneli.osterman, Chip.Halvorsen, cj.lynce, dbarden, fridolin.somers, gmcharlt, jonathan.druart, kebliss, kkrueger, kyle, laura, tomascohen, trevor.diamond
Version: MainKeywords: regression, rel_25_05_candidate
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40931
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This fixes a problem where the item specific branch choice was not being set correctly when placing a hold on multiple items at the same time in the staff interface.
Version(s) released in:
25.11.00,25.05.05,24.11.11
Circulation function: Holds
Bug Depends on: 30579    
Bug Blocks:    
Attachments: Bug 40899: Fix rendering of JSON in data-attribute with html filter
Bug 40899: Fix rendering of JSON in data-attribute with html filter
Screenshot of Place holds modal
Bug 40899: Fix rendering of JSON in data-attribute with html filter

Description Lucas Gass (lukeg) 2025-09-29 16:48:55 UTC
To recreate:

1. Place a hold on many items 
2. Change the "Pickup at:" dropdown" to something else 
2. Notice the "Pickup location:" dropdowns do not change with it 

This is a regression.
Comment 1 Lucas Gass (lukeg) 2025-09-30 13:07:05 UTC
The rendered data-pickup-locations attribute does not look right.
Comment 2 Lucas Gass (lukeg) 2025-09-30 13:21:01 UTC
Created attachment 187102 [details] [review]
Bug 40899: Fix rendering of JSON in data-attribute with html filter

To test:
1. Place a hold on many items
2. Change the "Pickup at:" dropdown" to something else
3. Notice the "Pickup location:" dropdowns do not change with it
4. APPLY PATCH
5. Try steps 1 & 2 again. This time the dropdpwns should adjust accordingly
Comment 3 WPPL Sandboxes 2025-09-30 21:01:47 UTC
Created attachment 187140 [details] [review]
Bug 40899: Fix rendering of JSON in data-attribute with html filter

To test:
1. Place a hold on many items
2. Change the "Pickup at:" dropdown" to something else
3. Notice the "Pickup location:" dropdowns do not change with it
4. APPLY PATCH
5. Try steps 1 & 2 again. This time the dropdpwns should adjust accordingly

Signed-off-by: Chip Halvorsen <chip.halvorsen@westlakelibrary.org>
Comment 4 Chip Halvorsen 2025-09-30 21:06:06 UTC
The patch is functioning as intended. However, the Pickup locations that are filled for each hold are not readable. The column is too narrow so only the first letter or two displays.
Comment 5 Chip Halvorsen 2025-09-30 21:08:35 UTC
Created attachment 187141 [details]
Screenshot of Place holds modal
Comment 6 CJ Lynce 2025-10-01 16:32:30 UTC
(In reply to Chip Halvorsen from comment #4)
> The patch is functioning as intended. However, the Pickup locations that are
> filled for each hold are not readable. The column is too narrow so only the
> first letter or two displays.

I submitted bug 40931 for this issue since it is a css template issue.
Comment 7 Jonathan Druart 2025-10-06 09:42:29 UTC
What caused the regression?
Comment 8 Jonathan Druart 2025-10-06 09:55:34 UTC
Created attachment 187453 [details] [review]
Bug 40899: Fix rendering of JSON in data-attribute with html filter

To test:
1. Place a hold on many items
2. Change the "Pickup at:" dropdown" to something else
3. Notice the "Pickup location:" dropdowns do not change with it
4. APPLY PATCH
5. Try steps 1 & 2 again. This time the dropdpwns should adjust accordingly

Signed-off-by: Chip Halvorsen <chip.halvorsen@westlakelibrary.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 9 Lucas Gass (lukeg) 2025-10-06 15:17:05 UTC
Nice work everyone!

Pushed to main for 25.11
Comment 10 Kristi Krueger 2025-10-08 17:46:11 UTC
We do have the jquery fix in place, but it would also be great to see this backported.
Comment 11 Paul Derscheid 2025-10-23 21:11:28 UTC
Nice work everyone!

Pushed to 25.05.x
Comment 12 Fridolin Somers 2025-11-10 13:37:37 UTC
Pushed to 24.11.x for 24.11.11