From ce478da6ab4bf48876101a28856f90d9f6434c52 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 19 Aug 2022 13:11:09 +0000 Subject: [PATCH] Bug 31112: (QA follow-up) Restore check to avoid extra processing We now count all holds for all patrons, we can still eject if we have more holds than we do items Signed-off-by: Nick Clemens Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 4676ce1a03fee089c4aa51a49ecc646afb91450a) Signed-off-by: Lucas Gass --- C4/Circulation.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 3944a66a60..add037af3a 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2958,6 +2958,8 @@ sub CanBookBeRenewed { notforloan => 0, -not => { itemnumber => $itemnumber } })->as_list; + return ( 0, "on_reserve" ) if scalar @other_items < scalar @possible_holds; + my %matched_items; foreach my $possible_hold (@possible_holds) { my $fillable = 0; -- 2.39.5