Bugzilla – Attachment 125280 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.16 KB, created by
Martin Renvoize (ashimema)
on 2021-09-24 15:59:34 UTC
(
hide
)
Description:
Bug 28510: Skip processing holds queue items from closed libraries when HoldsQueueSkipClosed is enabled
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-09-24 15:59:34 UTC
Size:
2.16 KB
patch
obsolete
>From 3b70d0a5c40e0414faf7edf032f3d82a3b033208 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 > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/HoldsQueue.pm | 15 +++++++++------ > 1 file changed, 9 insertions(+), 6 deletions(-) > >diff --git a/C4/HoldsQueue.pm b/C4/HoldsQueue.pm >index 06b0b2a2efa..f5743ceddf6 100644 >--- a/C4/HoldsQueue.pm >+++ b/C4/HoldsQueue.pm >@@ -193,9 +193,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(); > >@@ -778,11 +777,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.20.1
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