Bugzilla – Attachment 172586 Details for
Bug 38126
Holds queue is allocating holds twice when using TransportCostMatrix and LocalHoldsPriority
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38126: Skip allocated holds when filling from transport cost matrix
Bug-38126-Skip-allocated-holds-when-filling-from-t.patch (text/plain), 1.84 KB, created by
Brendan Lawlor
on 2024-10-10 13:24:38 UTC
(
hide
)
Description:
Bug 38126: Skip allocated holds when filling from transport cost matrix
Filename:
MIME Type:
Creator:
Brendan Lawlor
Created:
2024-10-10 13:24:38 UTC
Size:
1.84 KB
patch
obsolete
>From 817e59ee10e3d4c631aa7897fd2da5004e52295d Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 8 Oct 2024 18:10:46 +0000 >Subject: [PATCH] Bug 38126: Skip allocated holds when filling from transport > cost matrix > >This patch simply weeds out allocated holds before filling from the matrix > >To test: > 1 - Enable RealTimeHoldsQueue > 2 - Enable UseTransportCostMatrix > 3 - Enable LocalHoldsPriority Give/Home/Home > 4 - Administration - Transport cost matrix - enable transfers to/from Centreville and other libraries, add a cost, and save > 5 - Find a bib with a Centerville item > 6 - Place a hold for a centerville patron > 7 - Circulation - Holds queue - All libraries > 8 - Note hold is entered twice > 9 - On command line: > perl misc/cronjobs/holds/build_holds_queue.pl --force >10 - Run holds queue again, still there twice >11 - Apply patch >12 - On command line: > perl misc/cronjobs/holds/build_holds_queue.pl --force > Confirm allocated only once >13 - Delete hold, place again from bib record (to test real time allocation) >14 - Confirm allocated only once > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> >--- > C4/HoldsQueue.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/HoldsQueue.pm b/C4/HoldsQueue.pm >index 56e07cbbca..052c095121 100644 >--- a/C4/HoldsQueue.pm >+++ b/C4/HoldsQueue.pm >@@ -421,7 +421,7 @@ sub _allocateWithTransportCostMatrix { > my @remaining_items = grep { !exists $allocated_items->{ $_->{itemnumber} } && $_->{holdallowed} ne 'not_allowed'; } > @$available_items; > >- my @requests = grep { !defined $_->{itemnumber} } @$hold_requests; >+ my @requests = grep { !defined $_->{itemnumber} && !defined $_->{allocated} } @$hold_requests; > my @remaining = (); > > my $num_agents = scalar(@remaining_items); >-- >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 38126
:
172548
|
172568
|
172586
|
172697