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 <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Martin Renvoize 2023-03-15 15:24:32 +00:00 committed by Tomas Cohen Arazi
parent 788363e416
commit 042cba5db1
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 1 additions and 1 deletions

View File

@ -2957,7 +2957,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(
{