Bug 39912

Summary: RealTimeHoldsQueue should be rebuilt when a holds pickup location is changed
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: Hold requestsAssignee: Nick Clemens (kidclamp) <nick>
Status: Pushed to main --- QA Contact: Martin Renvoize (ashimema) <martin.renvoize>
Severity: normal    
Priority: P5 - low CC: blawlor, gmcharlt, lucas, martin.renvoize, mspinney
Version: MainKeywords: release-notes-needed
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
25.11.00
Circulation function:
Attachments: Bug 39912: Update RealTimeHoldsQueue when hold pickup location is updated
Bug 39912: Update RealTimeHoldsQueue when hold pickup location is updated
Bug 39912: Update RealTimeHoldsQueue when hold pickup location is updated

Description Nick Clemens (kidclamp) 2025-05-15 18:01:31 UTC
Currently when the pickup location for a hold is changed via the interface or the API we do not rebuild the holds queue.

If a hold is to be picked up a new location it may meet LocalHoldsPriority, or there may be an item available.

We should trigger a rebuild of the queue whenever the location is updated
Comment 1 Nick Clemens (kidclamp) 2025-05-15 18:32:06 UTC
Created attachment 182504 [details] [review]
Bug 39912: Update RealTimeHoldsQueue when hold pickup location is updated

When a hold's pickup location is changed we should rebuild the holds queue.

To test:
1 - Enable RealTimeHoldsQueue
2 - Enable LocalHoldsPriority where pickup library matches home library
3 - Place two biblio level holds on a bib with one item for two different patrons for delivery to a different library then the home library
4 - Check the queue - firstpatron should have priority
5 - Change the pickup location for the second hold to be picked up at the home library
6 - Check the queue, unchanged
7 - Change the pickup location back
8 - Apply patch, restart all
9 - Change the pcikup location to the items home library again
10 - Check the queue
11 - Second patron has now been given priority
Comment 2 PTFS Europe Sandboxes 2025-05-20 23:09:47 UTC
Created attachment 182683 [details] [review]
Bug 39912: Update RealTimeHoldsQueue when hold pickup location is updated

When a hold's pickup location is changed we should rebuild the holds queue.

To test:
1 - Enable RealTimeHoldsQueue
2 - Enable LocalHoldsPriority where pickup library matches home library
3 - Place two biblio level holds on a bib with one item for two different patrons for delivery to a different library then the home library
4 - Check the queue - firstpatron should have priority
5 - Change the pickup location for the second hold to be picked up at the home library
6 - Check the queue, unchanged
7 - Change the pickup location back
8 - Apply patch, restart all
9 - Change the pcikup location to the items home library again
10 - Check the queue
11 - Second patron has now been given priority

Signed-off-by: Michelle Spinney <mspinney@clamsnet.org>
Comment 3 Martin Renvoize (ashimema) 2025-06-25 14:39:57 UTC
Created attachment 183502 [details] [review]
Bug 39912: Update RealTimeHoldsQueue when hold pickup location is updated

When a hold's pickup location is changed we should rebuild the holds queue.

To test:
1 - Enable RealTimeHoldsQueue
2 - Enable LocalHoldsPriority where pickup library matches home library
3 - Place two biblio level holds on a bib with one item for two different patrons for delivery to a different library then the home library
4 - Check the queue - firstpatron should have priority
5 - Change the pickup location for the second hold to be picked up at the home library
6 - Check the queue, unchanged
7 - Change the pickup location back
8 - Apply patch, restart all
9 - Change the pickup location to the items home library again
10 - Check the queue
11 - Second patron has now been given priority

Signed-off-by: Michelle Spinney <mspinney@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 4 Lucas Gass (lukeg) 2025-06-26 17:11:47 UTC
Nice work everyone!

Pushed to main for 25.11