[open-ils-commits] r18046 - branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher (gmc)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Sep 27 15:27:44 EDT 2010
Author: gmc
Date: 2010-09-27 15:27:39 -0400 (Mon, 27 Sep 2010)
New Revision: 18046
Modified:
branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm
Log:
fix glitch in hold target OU weighting
We want to weight by the copy's circulation library, not the
pickup library.
Signed-off-by: Galen Charlton <gmc at esilibrary.com>
Modified: branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm
===================================================================
--- branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm 2010-09-27 19:27:04 UTC (rev 18045)
+++ branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm 2010-09-27 19:27:39 UTC (rev 18046)
@@ -1746,15 +1746,16 @@
my ($prox) = $self->method_lookup('open-ils.storage.asset.copy.proximity')->run( $cp, $lib );
next unless (defined($prox));
+ my $copy_circ_lib = ''.$cp->circ_lib;
# Fetch the weighting value for hold targeting, defaulting to 1
- $self->{target_weight}{$lib} ||= $actor->request(
- 'open-ils.actor.ou_setting.ancestor_default' => $lib.'' => 'circ.holds.org_unit_target_weight'
+ $self->{target_weight}{$copy_circ_lib} ||= $actor->request(
+ 'open-ils.actor.ou_setting.ancestor_default' => $copy_circ_lib.'' => 'circ.holds.org_unit_target_weight'
)->gather(1);
- $self->{target_weight}{$lib} = $self->{target_weight}{$lib}{value} if (ref $self->{target_weight}{$lib});
- $self->{target_weight}{$lib} ||= 1;
+ $self->{target_weight}{$copy_circ_lib} = $self->{target_weight}{$copy_circ_lib}{value} if (ref $self->{target_weight}{$copy_circ_lib});
+ $self->{target_weight}{$copy_circ_lib} ||= 1;
$prox_list[$prox] = [] unless defined($prox_list[$prox]);
- for my $w ( 1 .. $self->{target_weight}{$lib} ) {
+ for my $w ( 1 .. $self->{target_weight}{$copy_circ_lib} ) {
push @{$prox_list[$prox]}, $cp;
}
}
More information about the open-ils-commits
mailing list