Bug 11634 - Allow renewal of item with unfilled holds if other available items can...
authorKyle M Hall <kyle@bywatersolutions.com>
Wed, 29 Jan 2014 15:52:08 +0000 (10:52 -0500)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Wed, 12 Nov 2014 14:27:31 +0000 (11:27 -0300)
commitebf4350735da7ea365f3b5b72410f6810a9182b8
treea87e209e36cf1d0f66820e1dde7a0575f222f187
parent3bc14af683fbdb37e881d16d0f7da5ef313c165a
Bug 11634 - Allow renewal of item with unfilled holds if other available items can fill those holds

The current holds behavior in Koha allows a situation like this:
- Patron A has an item currently checked out.
- Patron B places a hold on the next available copy of that title.
- Then Patron A will not be able to renew his item, even if there are
  other available copies of that title that could potentially fill Patron
  B's hold.

Since this seems unfair to Patron A, we should allow renewal of items
even if there are unfilled holds, but those holds could all be filled
with currently available items.

Test Plan:
1) Apply this patch
2) Create a record with two items
3) Check out the item to a patron
4) Place a hold on the record
5) Note you cannot renew the item for the patron
6) Enable the new system preference AllowRenewalIfOtherItemsAvailable
7) Note you can now renew the item, as all the holds can be satisfied
   by available items.
8) Place a second hold on the record
9) Note you can no longer renew the item, as all the holds *cannot*
   be filled by currently available items

Signed-off-by: Holger Meissner <h.meissner.82@web.de>
Signed-off-by: Chris Rohde <crohde@roseville.ca.us>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
C4/Circulation.pm
C4/Reserves.pm
installer/data/mysql/sysprefs.sql
installer/data/mysql/updatedatabase.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref