Bugzilla – Attachment 185355 Details for
Bug 40620
Holds Queue will assign to the lowest item number if multiple branches have the same transport cost
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40620: Holds Queue will assign to the lowest item number if multiple branches have the same transport cost
Bug-40620-Holds-Queue-will-assign-to-the-lowest-it.patch (text/plain), 2.03 KB, created by
Lisette Scheer
on 2025-08-12 21:09:55 UTC
(
hide
)
Description:
Bug 40620: Holds Queue will assign to the lowest item number if multiple branches have the same transport cost
Filename:
MIME Type:
Creator:
Lisette Scheer
Created:
2025-08-12 21:09:55 UTC
Size:
2.03 KB
patch
obsolete
>From a01f1b93391f2bbf08c2215ceb177c8db2f83d9d Mon Sep 17 00:00:00 2001 >From: Lisette Scheer <lisette@bywatersolutions.com> >Date: Tue, 12 Aug 2025 20:59:01 +0000 >Subject: [PATCH] Bug 40620: Holds Queue will assign to the lowest item number > if multiple branches have the same transport cost > >To Test: >Before applying: >1. Turn on the UseTransportCostMatrix system preference >2. Create holds on a record with multiple items. (I used Lanark in KTD) >3. Set the item location to all be the same (I used MID) >4. Set the holds to pickup at Centerville, Fairfield, and Pleasant Valley >5. Set the transport cost matrix to >Centerville\fairfield 1 >Centerville\Midway 1 >Fairfield\Centerville 1 >Fairfield\Midway 1 >Midway\Centerville 1 >Midway\Fairfield 1 >Midway\Pleasant Valley 4 > >6. Build the holds queue (either turn on realtime hold queue and then edit the bib to update or run the cron on the command line) >7. Run a report: select * from hold_fill_targets where biblionumber=9 order by borrowernumber; >8. Rebuild the hold queue >9. Run the report again, the results should be the same. > >10. Apply the patch >11. Run the hold queue again >12. Observe the results should now be different. >13. Try a few more times and ensure the numbers are changing, create some more items at midway and try again to see more variety in numbers. >--- > C4/HoldsQueue.pm | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/C4/HoldsQueue.pm b/C4/HoldsQueue.pm >index c0ffd43ac2f..79373937dc5 100644 >--- a/C4/HoldsQueue.pm >+++ b/C4/HoldsQueue.pm >@@ -442,8 +442,9 @@ sub _allocateWithTransportCostMatrix { > > my @allocated; > >- my @remaining_items = grep { !exists $allocated_items->{ $_->{itemnumber} } && $_->{holdallowed} ne 'not_allowed'; } >- @$available_items; >+ my @remaining_items = >+ shuffle( grep { !exists $allocated_items->{ $_->{itemnumber} } && $_->{holdallowed} ne 'not_allowed'; } >+ @$available_items ); > > my @requests = grep { !defined $_->{itemnumber} && !defined $_->{allocated} } @$hold_requests; > my @remaining = (); >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40620
:
185355
|
185427
|
185431