[open-ils-commits] r13300 - branches/rel_1_4_0/Open-ILS/src/perlmods/OpenILS/Application/Circ (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Jun 3 11:38:51 EDT 2009
Author: erickson
Date: 2009-06-03 11:38:48 -0400 (Wed, 03 Jun 2009)
New Revision: 13300
Modified:
branches/rel_1_4_0/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
branches/rel_1_4_0/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
Log:
when retargeting alternate holds after opportunistic checkin capture, only retarget related holds not all holds with prev_check_time=null
Modified: branches/rel_1_4_0/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
===================================================================
--- branches/rel_1_4_0/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm 2009-06-03 15:38:22 UTC (rev 13299)
+++ branches/rel_1_4_0/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm 2009-06-03 15:38:48 UTC (rev 13300)
@@ -2033,9 +2033,10 @@
}
sub retarget_holds {
- $logger->info("retargeting prev_check_time=null holds after opportunistic capture");
+ my $self = shift;
+ $logger->info("circulator: retargeting holds @{$self->retarget} after opportunistic capture");
my $ses = OpenSRF::AppSession->create('open-ils.storage');
- $ses->request('open-ils.storage.action.hold_request.copy_targeter');
+ $ses->request('open-ils.storage.action.hold_request.copy_targeter', undef, $self->retarget);
# no reason to wait for the return value
return;
}
Modified: branches/rel_1_4_0/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
===================================================================
--- branches/rel_1_4_0/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm 2009-06-03 15:38:22 UTC (rev 13299)
+++ branches/rel_1_4_0/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm 2009-06-03 15:38:48 UTC (rev 13300)
@@ -1525,7 +1525,7 @@
or return (undef, $editor->event);
- my $retarget = 0;
+ my @retarget;
# re-target any other holds that already target this copy
for my $old_hold (@$old_holds) {
@@ -1536,10 +1536,10 @@
$old_hold->clear_prev_check_time;
$editor->update_action_hold_request($old_hold)
or return (undef, $editor->event);
- $retarget = 1;
+ push(@retarget, $old_hold->id);
}
- return ($best_hold, undef, $retarget);
+ return ($best_hold, undef, (@retarget) ? \@retarget : undef);
}
More information about the open-ils-commits
mailing list