From 3a2bd5e878f913b235cbcac3d1af964b2ecfeb8a Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 2 Aug 2012 12:23:11 -0400 Subject: [PATCH] Bug 8562 - RandomizeHoldsQueueWeight ignored if StaticHoldsQueueWeight is empty. If StaticHoldsQueueWeight is empty, but RandomizeHoldsQueueWeight is enabled, the script build_holds_queue.pl should select branches for fulfillment requests at random. Instead, it will select them in alphabetical order. --- misc/cronjobs/holds/build_holds_queue.pl | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/misc/cronjobs/holds/build_holds_queue.pl b/misc/cronjobs/holds/build_holds_queue.pl index f01153e..e1a3d86 100755 --- a/misc/cronjobs/holds/build_holds_queue.pl +++ b/misc/cronjobs/holds/build_holds_queue.pl @@ -287,6 +287,7 @@ sub MapItemsToHoldRequests { @pull_branches = @branches_to_use; } else { @pull_branches = sort keys %items_by_branch; + shuffle(@pull_branches) if C4::Context->preference("RandomizeHoldsQueueWeight"); } foreach my $branch (@pull_branches) { next unless exists $items_by_branch{$branch} and -- 1.7.2.5