From 9c4db9b670a0c5a98d5901f77274b7f08c44b2cd Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Wed, 11 Jan 2017 16:50:15 +0100 Subject: [PATCH] Bug 17884 - troubles with syspref AllowHoldPolicyOverride on return MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Test plan : 1° with syspref AllowHoldPolicyOverride O. 2° in "Holds policy by item type" (in smart-rules.pl) with "no holds allowed" selected for an itype. 3° create an hold on an item of this ityp. 4° return this ite. 5° you have no message about the hold and the hold is not in status waitin, due to the lack of the check about the syspref during the check in. 6Â with this patch you get the message about the existing hold. Signed-off-by: Claire Gravely --- C4/Reserves.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Reserves.pm b/C4/Reserves.pm index 9ef33ad..32afe9c 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -973,7 +973,7 @@ sub CheckReserves { $borrowerinfo ||= C4::Members::GetMember( borrowernumber => $res->{'borrowernumber'} ); my $branch = GetReservesControlBranch( $iteminfo, $borrowerinfo ); my $branchitemrule = C4::Circulation::GetBranchItemRule($branch,$iteminfo->{'itype'}); - next if ($branchitemrule->{'holdallowed'} == 0); + next if ($branchitemrule->{'holdallowed'} == 0 && !C4::Context->preference('AllowHoldPolicyOverride')); next if (($branchitemrule->{'holdallowed'} == 1) && ($branch ne $borrowerinfo->{'branchcode'})); next if ( ($branchitemrule->{hold_fulfillment_policy} ne 'any') && ($res->{branchcode} ne $iteminfo->{ $branchitemrule->{hold_fulfillment_policy} }) ); $priority = $res->{'priority'}; -- 2.1.4