Bug 18015 - On shelf holds allowed > "If all unavailable" ignores notforloan

If in the circ rules matrix you set "On shelf holds allowed" to "If all unavailable",
items with status "Not for loan" are considered available and break the functionality.

Test plan:

- Set "On shelf holds allowed" to "If all unavailable" for your patron and item
  category (or everyone and everything)
- Have two items for a record. Check out one
- Set 7 - Not for loan: "Not For Loan" for the second item
- Try to place a hold. Does not work.

- Apply the patch
- Try to place a hold. Should work now.

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Mirko Tietgen 2017-01-30 15:59:59 +01:00 committed by Kyle M Hall
parent 58e7a0a5d5
commit 844cf7a748

View file

@ -1514,7 +1514,7 @@ sub IsAvailableForItemLevelRequest {
foreach my $i (@items) {
$any_available = 1
unless $i->itemlost
|| $i->{notforloan} > 0
|| $i->notforloan > 0
|| $i->withdrawn
|| $i->onloan
|| IsItemOnHoldAndFound( $i->id )