Bug 15534 - Add the ability to prevent a patron from placing a hold on a record with...
authorKyle M Hall <kyle@bywatersolutions.com>
Sat, 6 Feb 2016 03:59:31 +0000 (03:59 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 29 Apr 2016 10:35:05 +0000 (10:35 +0000)
commit4e1d7a16896787cb4e874abce8fc051a3c12a3ae
tree6971697caa20bacdaf9778668aa407667a1ece40
parent07e44886042cd29dd17e1f2aac1aeb6abc9df795
Bug 15534 - Add the ability to prevent a patron from placing a hold on a record with available items

Some libraries would like to prevent patrons from placing holds on
items where there are other items available for the patron to
check out.

Test Plan:
1) Apply this patch
2) Browse to the circulation rules
3) Note the new option for "On shelf holds allowed"
4) Set the rule to "If all unavailable", set "item level holds" to allow
5) Find a patron/branch/itemtype applicable to this rule
6) Ensure at least one item on the record is available for the
   patron to check out
7) Attempt to place a hold for the item
8) Note you cannot place the hold
9) Check the available item out to another patron
10) Note you can now place a hold for the first patron

Signed-off-by: Andreas Hedström Mace <andreas.hedstrom.mace@sub.su.se>

Works as intended!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
C4/Reserves.pm
koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt
t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t [new file with mode: 0755]