From ded05deb102de13de95c5e0f76bfaf79075423cf 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 --- C4/Circulation.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index d3f63475dd..a1f6d89cbf 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2918,7 +2918,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