Bugzilla – Attachment 16324 Details for
Bug 8562
RandomizeHoldsQueueWeight ignored if StaticHoldsQueueWeight is empty.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8562 - RandomizeHoldsQueueWeight ignored if StaticHoldsQueueWeight is empty.
Bug-8562---RandomizeHoldsQueueWeight-ignored-if-St.patch (text/plain), 1.80 KB, created by
Kyle M Hall (khall)
on 2013-03-19 08:56:44 UTC
(
hide
)
Description:
Bug 8562 - RandomizeHoldsQueueWeight ignored if StaticHoldsQueueWeight is empty.
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-03-19 08:56:44 UTC
Size:
1.80 KB
patch
obsolete
>From 9c11e359e25dcf4706eda343d9037f813c765188 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 19 Mar 2013 01:49:01 -0700 >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. > >Test Plan: >1) Apply patch >2) Set the system preference StaticHoldsQueueWeight to empty >3) Create a hold on an record with items at multiple libraries >4) Run build_holds_queue.pl >5) Look at the holds queue report from the circulation home page >6) Run build_holds_queue.pl again >7) Look at the holds queue report again, note the library chosen > for fulfillment of the hold has likely changed. >8) Repeat steps 6-7 until you are satisfied the library to fulfill > the hold is chosen at random. >--- > C4/HoldsQueue.pm | 7 ++++--- > 1 files changed, 4 insertions(+), 3 deletions(-) > >diff --git a/C4/HoldsQueue.pm b/C4/HoldsQueue.pm >index 7d38963..7377d51 100755 >--- a/C4/HoldsQueue.pm >+++ b/C4/HoldsQueue.pm >@@ -570,14 +570,15 @@ sub _trim { > } > > sub load_branches_to_pull_from { >- my $static_branch_list = C4::Context->preference("StaticHoldsQueueWeight") >- or return; >+ my $static_branch_list = C4::Context->preference("StaticHoldsQueueWeight"); > > my @branches_to_use = map _trim($_), split /,/, $static_branch_list; > > @branches_to_use = shuffle(@branches_to_use) if C4::Context->preference("RandomizeHoldsQueueWeight"); > >- return \@branches_to_use; >+ @branches_to_use = shuffle keys %{GetBranches()} unless ( @branches_to_use ); >+ >+ return ( @branches_to_use ) ? \@branches_to_use : undef; > } > > sub least_cost_branch { >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8562
:
11302
|
11303
|
16323
|
16324
|
16794