Bugzilla – Attachment 121578 Details for
Bug 28510
Skip processing holds queue items from closed libraries when HoldsQueueSkipClosed is enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28510: Skip processing holds queue items from closed libraries when HoldsQueueSkipClosed is enabled
Bug-28510-Skip-processing-holds-queue-items-from-c.patch (text/plain), 2.06 KB, created by
Kyle M Hall (khall)
on 2021-06-03 10:54:51 UTC
(
hide
)
Description:
Bug 28510: Skip processing holds queue items from closed libraries when HoldsQueueSkipClosed is enabled
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2021-06-03 10:54:51 UTC
Size:
2.06 KB
patch
obsolete
>From 08c69df5dfd819f7e942c7a6044ab76f7ccd1fe7 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 3 Jun 2021 06:44:59 -0400 >Subject: [PATCH] Bug 28510: Skip processing holds queue items from closed > libraries when HoldsQueueSkipClosed is enabled > >Right now we skip closed branch's items as we iterate over all items looking for ones to fill a hold. If HoldsQueueSkipClosed is enabled, no items held be a closed library can be targeted, so it would be more efficient if we never selected the items from those branches to begin with. This is how the holds queue works if we are not using the transport cost matrix, so we should make it work the same way if we *are* using the matrix. > >Test Plan: >1) Apply this patch >2) prove prove t/db_dependent/HoldsQueue.t >3) All tests should continue to pass >--- > C4/HoldsQueue.pm | 15 +++++++++------ > 1 file changed, 9 insertions(+), 6 deletions(-) > >diff --git a/C4/HoldsQueue.pm b/C4/HoldsQueue.pm >index 3774214527..e1ae3c4830 100644 >--- a/C4/HoldsQueue.pm >+++ b/C4/HoldsQueue.pm >@@ -196,9 +196,8 @@ sub CreateQueue { > undef $transport_cost_matrix; > } > } >- unless ($transport_cost_matrix) { >- $branches_to_use = load_branches_to_pull_from(); >- } >+ >+ $branches_to_use = load_branches_to_pull_from($use_transport_cost_matrix); > > my $bibs_with_pending_requests = GetBibsWithPendingHoldRequests(); > >@@ -781,11 +780,15 @@ sub _trim { > } > > sub load_branches_to_pull_from { >+ my $use_transport_cost_matrix = shift; >+ > my @branches_to_use; > >- my $static_branch_list = C4::Context->preference("StaticHoldsQueueWeight"); >- @branches_to_use = map { _trim($_) } split( /,/, $static_branch_list ) >- if $static_branch_list; >+ unless ( $use_transport_cost_matrix ) { >+ my $static_branch_list = C4::Context->preference("StaticHoldsQueueWeight"); >+ @branches_to_use = map { _trim($_) } split( /,/, $static_branch_list ) >+ if $static_branch_list; >+ } > > @branches_to_use = > Koha::Database->new()->schema()->resultset('Branch') >-- >2.30.1 (Apple Git-130)
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 28510
:
121578
|
121579
|
121588
|
122193
|
122194
|
122195
|
124842
|
125280
|
125281
|
125282
|
125283