From: Ian Walls Date: Thu, 9 Sep 2010 20:19:10 +0000 (-0400) Subject: Fix for Bug 4449: AllowHoldPolicyOverride cannot over all policies X-Git-Tag: html_template_pro~32^2 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;h=00e019bfd7c671c723e7d74e2a1558bb5da62e2a;p=koha-ffzg.git Fix for Bug 4449: AllowHoldPolicyOverride cannot over all policies AllowHoldPolicyOverride should be able to override AllowOnShelfHolds, as well as other possible reasons for blocking a hold. Before, this only allowed override of branch policies set in Circ Rules. Signed-off-by: Nicole Engard Signed-off-by: Chris Cormack --- diff --git a/reserve/request.pl b/reserve/request.pl index 7e513648eb..e8942b4c02 100755 --- a/reserve/request.pl +++ b/reserve/request.pl @@ -428,10 +428,7 @@ foreach my $biblionumber (@biblionumbers) { } if (IsAvailableForItemLevelRequest($itemnumber) and not $item->{cantreserve} and CanItemBeReserved($borrowerinfo->{borrowernumber}, $itemnumber) ) { - if ( not $policy_holdallowed and C4::Context->preference( 'AllowHoldPolicyOverride' ) ) { - $item->{override} = 1; - $num_override++; - } elsif ( $policy_holdallowed ) { + if ( $policy_holdallowed ) { $item->{available} = 1; $num_available++; } @@ -439,6 +436,12 @@ foreach my $biblionumber (@biblionumbers) { $item->{override} = 1; $num_override++; } + # If AllowHoldPolicyOverride is set, it should override EVERY restriction, not just branch item rules + if (C4::Context->preference( 'AllowHoldPolicyOverride' ) ) { + $item->{override} = 1; + $num_override++; + } + # If none of the conditions hold true, then neither override nor available is set and the item cannot be checked # FIXME: move this to a pm