From e049978ed93b016021eb38a43ec347a897384613 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 3 Jun 2021 07:29:52 -0400 Subject: [PATCH] Bug 28510: Remove unnecessary conditional It makes sense to use items by branch to get the list of branches, as it already tells use which branches have available items. We could use branches to pull from instead, but all we would accomplish is added extra ununsed loop iterations. We already know that any additional branches in the branches to pull loop have no items to fill holds. If they did, they would be in the items_by_branch hash. Signed-off-by: David Nind --- C4/HoldsQueue.pm | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/C4/HoldsQueue.pm b/C4/HoldsQueue.pm index 15ff772079..7141ffa986 100644 --- a/C4/HoldsQueue.pm +++ b/C4/HoldsQueue.pm @@ -600,12 +600,7 @@ sub MapItemsToHoldRequests { } unless ($itemnumber) { - # not found yet, fall back to basics - if ($branches_to_use) { - $pull_branches = $branches_to_use; - } else { - $pull_branches = [keys %items_by_branch]; - } + $pull_branches = [keys %items_by_branch]; # Try picking items where the home and pickup branch match first PULL_BRANCHES: -- 2.20.1