From 0aa0a6e374f404bc4f67e82b9fe2d35b100bd8d3 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 30 May 2018 16:05:04 +0000 Subject: [PATCH] Bug 20837: Use ReservesControlBranch to determine holdability of items To test: 1 - Set a default holds plicy for an item type as 'from home library' 2 - Set CircControl to 'logged in library' 3 - Log in as staff from a library without the rule set 4 - Note you can set holds for patrons of any library on items of type above 5 - Toggle ReservesControlBranch and note that nothing changes 6 - Toggle CircControl and note some combinations don't allow holds 7 - Apply patch 8 - Toggle ReservesControlBranch and note that holdability is affected 9 - Toggle CircControl and note holdability does not change 10 - Read the note on admin/smartrules.pl and confirm it makes sense --- C4/Reserves.pm | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/C4/Reserves.pm b/C4/Reserves.pm index de7e3f0a2c..3b210f5b31 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -443,7 +443,7 @@ sub CanItemBeReserved { } my $circ_control_branch = - C4::Circulation::_GetCircControlBranch( $item->unblessed(), $borrower ); + GetReservesControlBranch( $item->unblessed(), $borrower ); my $branchitemrule = C4::Circulation::GetBranchItemRule( $circ_control_branch, $item->itype ); # FIXME Should not be item->effective_itemtype? diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt index e41d59b655..4b60a4cc0c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt @@ -1,5 +1,6 @@ [% USE raw %] [% USE Asset %] +[% USE Koha %] [% USE Branches %] [% USE Categories %] [% USE CirculationRules %] @@ -687,7 +688,7 @@
  • No holds allowed: No patron may put this book on hold.
  • Note: If the system preference 'AllowHoldPolicyOverride' is enabled, these policies can be overridden by your circulation staff.
    - Important: The policies are based on the patron's home library, not the library where the hold is being placed. + Important: The policies are applied based on the ReservesControlBranch system preference which is set to [% Koha.Preference('ReservesControlBranch') %].

    -- 2.11.0