[Koha-patches] [PATCH] [SIGNED-OFF] Bug 6259: AllowHoldPolicyOverride causes every hold to need override

Nicole C. Engard nengard at bywatersolutions.com
Tue Apr 26 00:30:22 CEST 2011


From: Ian Walls <sekjal at Samael.local>

Adds a check to make sure that the item is actually unavailable before requiring the override

Signed-off-by: Nicole C. Engard <nengard at bywatersolutions.com>
---
 reserve/request.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/reserve/request.pl b/reserve/request.pl
index c3c7a36..0b3bebc 100755
--- a/reserve/request.pl
+++ b/reserve/request.pl
@@ -443,7 +443,7 @@ foreach my $biblionumber (@biblionumbers) {
                     $num_override++;
             }
             # If AllowHoldPolicyOverride is set, it should override EVERY restriction, not just branch item rules
-            if (C4::Context->preference( 'AllowHoldPolicyOverride' ) ) {
+            if (C4::Context->preference( 'AllowHoldPolicyOverride' ) && !$item->{available} ) {
                 $item->{override} = 1;
                 $num_override++;
             }   
-- 
1.7.2.3



More information about the Koha-patches mailing list