From d8095a74b4f7065dca9644dd8d393078c1032414 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 29 Nov 2023 13:12:52 +0000 Subject: [PATCH] Bug 35431: Check TransportCostMatrix if hold not filled by HoldsQueuePrioritizeBranch This patch changes an elsif to an if to ensure the matrix is checked every time To test: 1 - Apply unit test patch only 2 - prove -v t/db_dependent/HoldQueue.t 3 - It fails 4 - Apply this patch 5 - prove -v t/db_dependent/HoldQueue.t 6 - It passes 7 - All other tests continue to pass as well --- C4/HoldsQueue.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/HoldsQueue.pm b/C4/HoldsQueue.pm index 5e555f4f959..12ce63f7cfd 100644 --- a/C4/HoldsQueue.pm +++ b/C4/HoldsQueue.pm @@ -573,7 +573,7 @@ sub MapItemsToHoldRequests { } $holdingbranch = $pickup_branch; } - elsif ($transport_cost_matrix) { + if ($transport_cost_matrix) { $pull_branches = [keys %items_by_branch]; $holdingbranch = least_cost_branch( $pickup_branch, $pull_branches, $transport_cost_matrix ); if ( $holdingbranch ) { -- 2.30.2