Bug 6259: AllowHoldPolicyOverride causes every hold to need override

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>
This commit is contained in:
Ian Walls 2011-04-25 18:30:22 -04:00 committed by Chris Cormack
parent 883bc625b2
commit 6059599fac

View file

@ -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++;
}