From 51cd188b05b4e2d4176cc4b4be934746952a6913 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Tue, 30 Jul 2013 15:24:38 +0200 Subject: [PATCH] Bug 10663 - Partial fix - blocking renewal for item level holds Item level holds should prevent renewal of the item in the OPAC and in staff. For item level holds that are not yet W (=Waiting) GetReserveStatus didn't return the item as reserved, because reserves.found is NULL in this case. To test: - Add a record with an item - Check the item out - Check that you can renew the issue in OPAC and staff - Place an item level hold on the item - Check that you can no longer renew in OPAC and staff This is probably only a partial fix to a bigger problem, see notes on Bug 10663. --- C4/Reserves.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/C4/Reserves.pm b/C4/Reserves.pm index 1f89127..5efd256 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -788,8 +788,10 @@ sub GetReserveStatus { if(defined $found) { return 'Waiting' if $found eq 'W' and $priority == 0; return 'Finished' if $found eq 'F'; - return 'Reserved' if $priority > 0; } + if (defined $priority) { + return 'Reserved' if $priority > 0; + } return ''; #empty string here will remove need for checking undef, or less log lines } -- 1.7.10.4