[Koha-bugs] [Bug 8562] RandomizeHoldsQueueWeight ignored if StaticHoldsQueueWeight is empty.

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sun Apr 7 18:30:51 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8562

--- Comment #13 from Jared Camins-Esakov <jcamins at cpbibliography.com> ---
Comment on attachment 16794
  --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16794
Bug 8562 - RandomizeHoldsQueueWeight ignored if StaticHoldsQueueWeight is
empty.

Review of attachment 16794:
 --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=8562&attachment=16794)
-----------------------------------------------------------------

::: C4/HoldsQueue.pm
@@ +575,5 @@
>      my @branches_to_use = map _trim($_), split /,/, $static_branch_list;
>  
>      @branches_to_use = shuffle(@branches_to_use) if  C4::Context->preference("RandomizeHoldsQueueWeight");
>  
> +    @branches_to_use = shuffle keys %{GetBranches()} unless ( @branches_to_use );

I do not think that this is correct. The branches are shuffled regardless of
the value of RandomizeHoldsQueueWeight. Perhaps better would be:
@branches_to_use ||= keys %{GetBranches()}; # (or the correct version of that
statement, since I didn't test my suggestion)
right after the definition of @branches_to_use?

Also, I think there is a problem here with the default value of
StaticHoldsQueueWeight, which is '0'(?). This could be addressed on a different
bug.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list