From a32bd102e0ee187efd1595760a3a74eb60866204 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 2 Apr 2021 14:32:33 +0000 Subject: [PATCH] Bug 28013: (follow-up) Correct and update call to CanItemBeReserved MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The current call checks for truth against a returned hash, we need to check the 'status' value Signed-off-by: Joonas Kylmälä Signed-off-by: Jonathan Druart (cherry picked from commit ded05deb102de13de95c5e0f76bfaf79075423cf) Signed-off-by: Fridolin Somers (cherry picked from commit e26eb6df85c416394633b89d2837697e71d744af) Signed-off-by: Andrew Fuerste-Henry --- C4/Circulation.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 9193168de1..9c963ddda5 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2841,7 +2841,7 @@ sub CanBookBeRenewed { next if IsItemOnHoldAndFound( $item->itemnumber ); while ( my $patron = $patrons->next ) { next unless IsAvailableForItemLevelRequest($item, $patron); - next unless CanItemBeReserved($patron->borrowernumber,$item->itemnumber); + next unless CanItemBeReserved($patron->borrowernumber,$item->itemnumber,undef,{ignore_hold_counts=>1})->{status} eq 'OK'; push @reservable, $item->itemnumber; if (@reservable >= @borrowernumbers) { $resfound = 0; -- 2.39.5