Bugzilla – Attachment 116817 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: Perltidy _checkHoldPolicy
Bug-27068-Perltidy-checkHoldPolicy.patch (text/plain), 2.65 KB, created by
Kyle M Hall (khall)
on 2021-02-12 11:25:57 UTC
(
hide
)
Description:
Bug 27068: Perltidy _checkHoldPolicy
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2021-02-12 11:25:57 UTC
Size:
2.65 KB
patch
obsolete
>From 7503ca8056ee4e44a120b89c8f9921e0a216bb45 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 12 Feb 2021 12:11:54 +0100 >Subject: [PATCH] Bug 27068: Perltidy _checkHoldPolicy > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/HoldsQueue.pm | 32 +++++++++++++++++++++++++------- > 1 file changed, 25 insertions(+), 7 deletions(-) > >diff --git a/C4/HoldsQueue.pm b/C4/HoldsQueue.pm >index 943879e172..b0af40b938 100644 >--- a/C4/HoldsQueue.pm >+++ b/C4/HoldsQueue.pm >@@ -371,20 +371,38 @@ sub GetItemsAvailableToFillHoldRequestsForBib { > =cut > > sub _checkHoldPolicy { >- my ($item, $request) = @_; >+ my ( $item, $request ) = @_; > > return 0 unless $item->{holdallowed}; >- return 0 if $item->{holdallowed} == 1 && $item->{homebranch} ne $request->{borrowerbranch}; > >- return 0 if $item->{'holdallowed'} == 3 && !Koha::Libraries->find($item->{homebranch})->validate_hold_sibling({branchcode => $request->{borrowerbranch}}); >+ return 0 >+ if $item->{holdallowed} == 1 >+ && $item->{homebranch} ne $request->{borrowerbranch}; >+ >+ return 0 >+ if $item->{'holdallowed'} == 3 >+ && !Koha::Libraries->find( $item->{homebranch} ) >+ ->validate_hold_sibling( { branchcode => $request->{borrowerbranch} } ); > > my $hold_fulfillment_policy = $item->{hold_fulfillment_policy}; > >- return 0 if $hold_fulfillment_policy eq 'holdgroup' && !Koha::Libraries->find($item->{homebranch})->validate_hold_sibling({branchcode => $request->{branchcode}}); >- return 0 if $hold_fulfillment_policy eq 'homebranch' && $request->{branchcode} ne $item->{$hold_fulfillment_policy}; >- return 0 if $hold_fulfillment_policy eq 'holdingbranch' && $request->{branchcode} ne $item->{$hold_fulfillment_policy}; >+ return 0 >+ if $hold_fulfillment_policy eq 'holdgroup' >+ && !Koha::Libraries->find( $item->{homebranch} ) >+ ->validate_hold_sibling( { branchcode => $request->{branchcode} } ); >+ >+ return 0 >+ if $hold_fulfillment_policy eq 'homebranch' >+ && $request->{branchcode} ne $item->{$hold_fulfillment_policy}; >+ >+ return 0 >+ if $hold_fulfillment_policy eq 'holdingbranch' >+ && $request->{branchcode} ne $item->{$hold_fulfillment_policy}; > >- return 0 if $hold_fulfillment_policy eq 'patrongroup' && !Koha::Libraries->find($request->{borrowerbranch})->validate_hold_sibling({branchcode => $request->{branchcode}}); >+ return 0 >+ if $hold_fulfillment_policy eq 'patrongroup' >+ && !Koha::Libraries->find( $request->{borrowerbranch} ) >+ ->validate_hold_sibling( { branchcode => $request->{branchcode} } ); > > return 1; > >-- >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