Bug 6259: AllowHoldPolicyOverride causes every hold to need override
authorIan Walls <sekjal@Samael.local>
Mon, 25 Apr 2011 22:30:22 +0000 (18:30 -0400)
committerChris Cormack <chrisc@catalyst.net.nz>
Wed, 27 Apr 2011 04:21:43 +0000 (16:21 +1200)
Adds a check to make sure that the item is actually unavailable before requiring the override

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
reserve/request.pl

index c3c7a36..0b3bebc 100755 (executable)
@@ -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++;
             }