From e701a1015cf67d7f0fb27f6021b3c69f9ad78e40 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 20 Jan 2014 17:22:37 +0100 Subject: [PATCH] Bug 10827: Update item-level holds if deletion If a lower level priority hold is deleted, the next on the list should be marked as 'waiting' and the patron notified. This patch only affects item-level holds. Signed-off-by: Kyle M Hall --- C4/Reserves.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/C4/Reserves.pm b/C4/Reserves.pm index 1c44354..a2a86fd 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -1859,6 +1859,12 @@ sub _FixPriority { $j + 1, $priority[$j]->{'reserve_id'} ); + if ( $j == 0 ) { + my $res = GetReserve( $priority[$j]->{'reserve_id'} ); + if ( $res->{itemnumber} ) { + ModReserveAffect({ itemnumber => $res->{itemnumber}, borrowernumber => $res->{borrowernumber} }); + } + } } $sth = $dbh->prepare( "SELECT reserve_id FROM reserves WHERE lowestPriority = 1 ORDER BY priority" ); -- 1.7.10.4