From 4ff17ebc4aae18c6573bc8df3c4f2e0a773ef2e8 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 10 Jun 2019 10:37:15 -0400 Subject: [PATCH] Bug 26387: Suppress Holds Queue warning if hold is bib level and has an itemtype set If a hold is record level with an itemtype selected, a warning will be generated by the holds queue builder because $request->{itemnumber} }->{itype}. Test Plan: 1) Enable choosing of itemtype for holds 2) Place a bib level holds with an itemtype selected 3) Run holds queue builder 4) Note the warning 5) Apply this patch 6) Run the holds queue builder again 7) No warning! --- C4/HoldsQueue.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/HoldsQueue.pm b/C4/HoldsQueue.pm index 4950522726..287702bc54 100755 --- a/C4/HoldsQueue.pm +++ b/C4/HoldsQueue.pm @@ -525,7 +525,7 @@ sub MapItemsToHoldRequests { && ( ( $item->{hold_fulfillment_policy} eq 'any' ) # Don't fill item level holds that contravene the hold pickup policy at this time || $request->{branchcode} eq $item->{ $item->{hold_fulfillment_policy} } ) && ( !$request->{itemtype} # If hold itemtype is set, item's itemtype must match - || $items_by_itemnumber{ $request->{itemnumber} }->{itype} eq $request->{itemtype} ) + || ( $request->{itemnumber} && ( $items_by_itemnumber{ $request->{itemnumber} }->{itype} eq $request->{itemtype} ) ) ) ) { $itemnumber = $item->{itemnumber}; -- 2.24.1 (Apple Git-126)