From ec02433bc009aed1629d95b730b487582d75cec3 Mon Sep 17 00:00:00 2001 From: Andreas Jonsson Date: Sat, 13 Jan 2024 13:37:30 +0000 Subject: [PATCH] Bug 35805: Compare itemtype to the right item in MapItemsToHoldRequests --- C4/HoldsQueue.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/HoldsQueue.pm b/C4/HoldsQueue.pm index 464952a4b4..f58406f5bd 100644 --- a/C4/HoldsQueue.pm +++ b/C4/HoldsQueue.pm @@ -557,7 +557,7 @@ sub MapItemsToHoldRequests { $request->{borrowerbranch} eq $item->{$priority_branch} && _checkHoldPolicy($item, $request) # Don't fill item level holds that contravene the hold pickup policy at this time && ( !$request->{itemtype} # If hold itemtype is set, item's itemtype must match - || ( $request->{itemnumber} && ( $items_by_itemnumber{ $request->{itemnumber} }->{itype} eq $request->{itemtype} ) ) ) + || $items_by_itemnumber{ $item->{itemnumber} }->{itype} eq $request->{itemtype} ) && ( !$request->{item_group_id} # If hold item_group is set, item's item_group must match || ( $item->{_object}->item_group && $item->{_object}->item_group->id eq $request->{item_group_id} ) ) ) -- 2.39.2