Bugzilla – Attachment 113900 Details for
Bug 27068
HoldsQueue doesn't know how to use holds groups
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27068: Add hold group limits to Holds Queue builder
Bug-27068-Add-hold-group-limits-to-Holds-Queue-bui.patch (text/plain), 3.72 KB, created by
Kyle M Hall (khall)
on 2020-11-20 17:50:22 UTC
(
hide
)
Description:
Bug 27068: Add hold group limits to Holds Queue builder
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2020-11-20 17:50:22 UTC
Size:
3.72 KB
patch
obsolete
>From ea6bd172db50a944d5402b5281e80b41c5ff444c Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 20 Nov 2020 12:50:00 -0500 >Subject: [PATCH] Bug 27068: Add hold group limits to Holds Queue builder > >--- > C4/HoldsQueue.pm | 19 ++++++++++++++++++- > 1 file changed, 18 insertions(+), 1 deletion(-) > >diff --git a/C4/HoldsQueue.pm b/C4/HoldsQueue.pm >index 14b5dc15ce..f94268294b 100644 >--- a/C4/HoldsQueue.pm >+++ b/C4/HoldsQueue.pm >@@ -415,6 +415,9 @@ sub MapItemsToHoldRequests { > && $item->{homebranch} ne $request->{borrowerbranch} ) > || $item->{_object}->exclude_from_local_holds_priority; > >+ # Group holds >+ next if $item->{holdallowed} == 3 && !Koha::Libraries->find( $item->{homebranch} )->validate_hold_sibling( { branchcode => $request->{borrowerbranch} } ); >+ > next if $request->{itemnumber} && $request->{itemnumber} != $item->{itemnumber}; > > next unless $item->{_object}->can_be_transferred( { to => $libraries->{ $request->{branchcode} } } ); >@@ -584,6 +587,10 @@ sub MapItemsToHoldRequests { > foreach my $item (@$holding_branch_items) { > next if $pickup_branch ne $item->{homebranch}; > next if ( $item->{holdallowed} == 1 && $item->{homebranch} ne $request->{borrowerbranch} ); >+ >+ # Group holds >+ next if $item->{holdallowed} == 3 && !Koha::Libraries->find( $item->{homebranch} )->validate_hold_sibling( { branchcode => $request->{borrowerbranch} } ); >+ > next unless $items_by_itemnumber{ $item->{itemnumber} }->{_object}->can_be_transferred( { to => $libraries->{ $request->{branchcode} } } ); > > # Don't fill item level holds that contravene the hold pickup policy at this time >@@ -603,7 +610,12 @@ sub MapItemsToHoldRequests { > # Now try items from the least cost branch based on the transport cost matrix or StaticHoldsQueueWeight > unless ( $itemnumber ) { > foreach my $current_item ( @{ $items_by_branch{$holdingbranch} } ) { >- if ( $holdingbranch && ( $current_item->{holdallowed} == 2 || $request->{borrowerbranch} eq $current_item->{homebranch} ) ) { >+ if ( $holdingbranch && ( >+ $current_item->{holdallowed} == 2 >+ || $request->{borrowerbranch} eq $current_item->{homebranch} # holdallowed == 1 >+ # Group holds >+ || ( $current_item->{holdallowed} == 3 && Koha::Libraries->find( $current_item->{homebranch} )->validate_hold_sibling( { branchcode => $request->{borrowerbranch} } ) ) >+ ) ) { > > # Don't fill item level holds that contravene the hold pickup policy at this time > next unless $current_item->{hold_fulfillment_policy} eq 'any' >@@ -631,6 +643,11 @@ sub MapItemsToHoldRequests { > foreach my $item (@$holding_branch_items) { > next if ( $item->{holdallowed} == 1 && $item->{homebranch} ne $request->{borrowerbranch} ); > >+ # Group holds >+ next if $item->{holdallowed} == 3 >+ && !Koha::Libraries->find( $item->{homebranch} ) >+ ->validate_hold_sibling( { branchcode => $request->{borrowerbranch} } ); >+ > # Don't fill item level holds that contravene the hold pickup policy at this time > next unless $item->{hold_fulfillment_policy} eq 'any' > || $request->{branchcode} eq $item->{ $item->{hold_fulfillment_policy} }; >-- >2.24.1 (Apple Git-126)
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 27068
:
113900
|
114125
|
114140
|
114141
|
114142
|
115987
|
116022
|
116023
|
116024
|
116025
|
116026
|
116607
|
116608
|
116609
|
116610
|
116814
|
116815
|
116816
|
116817
|
117215