From d617065162df47ffaf35fc192f260c702fd62602 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 13 May 2019 15:07:41 +0000 Subject: [PATCH] Bug 22895: (bug 22650 follow-up) Correct itemnumber call in placerequest.pl Backport of 22650 makes an object call to an item hashref retrieved by get item: 94 if ( CanItemBeReserved($borrower->{'borrowernumber'}, $item->itemnumber, $branch)->{status} eq 'OK' ) { Should be $item->{itemnumber} To test: 1 - Try to place an item level hold 2 - It fails 3 - Aply patch 4 - Try again 5 - It works! Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize --- reserve/placerequest.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reserve/placerequest.pl b/reserve/placerequest.pl index 31b7e8c571..f89720fdd9 100755 --- a/reserve/placerequest.pl +++ b/reserve/placerequest.pl @@ -91,7 +91,7 @@ if ( $type eq 'str8' && $borrower ) { if ( $item->{'biblionumber'} ne $biblionumber ) { $biblionumber = $item->{'biblionumber'}; } - if ( CanItemBeReserved($borrower->{'borrowernumber'}, $item->itemnumber, $branch)->{status} eq 'OK' ) { + if ( CanItemBeReserved($borrower->{'borrowernumber'}, $item->{'itemnumber'}, $branch)->{status} eq 'OK' ) { AddReserve( $branch, $borrower->{'borrowernumber'}, $biblionumber, \@realbi, $rank[0], $startdate, $expirationdate, $notes, $title, $checkitem, $found, $itemtype ); -- 2.39.5