[Koha-patches] [PATCH] Fix for Bug 4449: AllowHoldPolicyOverride cannot over all policies
Nicole Engard
nengard at bywatersolutions.com
Thu Sep 9 22:46:44 CEST 2010
From: Ian Walls <ian.walls at bywatersolutions.com>
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 <nengard at bywatersolutions.com>
---
reserve/request.pl | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/reserve/request.pl b/reserve/request.pl
index 859a65b..963ce26 100755
--- a/reserve/request.pl
+++ b/reserve/request.pl
@@ -428,14 +428,17 @@ 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++;
}
}
+ # 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
--
1.5.6.5
More information about the Koha-patches
mailing list