From b70ad361aa42153d2baf9df473d463e15afe3fcf Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 15 Mar 2023 15:24:32 +0000 Subject: [PATCH] Bug 32878: (follow-up) Exclude non_priority holds This patch filters out non_priorty holds in the on_reserve condition. Test plan 1) Run t/db_dependant/Holds.t 2) Note it fails without this patch 3) Apply patch 4) Re-run the above test, note it now passes Signed-off-by: Nick Clemens Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 042cba5db1ee7752304e2e03c9a7b239ffe88735) Signed-off-by: Martin Renvoize --- C4/Circulation.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 04506a1db7..fe1991f2d1 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2964,7 +2964,7 @@ sub CanBookBeRenewed { # There is an item level hold on this item, no other item can fill the hold return ( 0, "on_reserve" ) - if ( $item->current_holds->count ); + if ( $item->current_holds->search( { non_priority => 0 } )->count ); my $fillable_holds = Koha::Holds->search( { -- 2.20.1