Bug 39912 - RealTimeHoldsQueue should be rebuilt when a holds pickup location is changed
Summary: RealTimeHoldsQueue should be rebuilt when a holds pickup location is changed
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Nick Clemens (kidclamp)
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords: release-notes-needed
Depends on:
Blocks:
 
Reported: 2025-05-15 18:01 UTC by Nick Clemens (kidclamp)
Modified: 2025-06-26 17:22 UTC (History)
5 users (show)

See Also:
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 (4.57 KB, patch)
2025-05-15 18:32 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 39912: Update RealTimeHoldsQueue when hold pickup location is updated (4.62 KB, patch)
2025-05-20 23:09 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 39912: Update RealTimeHoldsQueue when hold pickup location is updated (4.69 KB, patch)
2025-06-25 14:39 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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