[open-ils-commits] r13909 - in branches/rel_1_6/Open-ILS/src: perlmods/OpenILS/Application/Circ sql/Pg (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Aug 20 17:13:14 EDT 2009
Author: erickson
Date: 2009-08-20 17:13:08 -0400 (Thu, 20 Aug 2009)
New Revision: 13909
Modified:
branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
branches/rel_1_6/Open-ILS/src/sql/Pg/950.data.seed-values.sql
Log:
set hold.shelf_time when item hits the shelf. updated hold notify event def to use shelf_time as the delay field
Modified: branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
===================================================================
--- branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm 2009-08-20 20:56:39 UTC (rev 13908)
+++ branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm 2009-08-20 21:13:08 UTC (rev 13909)
@@ -1914,11 +1914,12 @@
$self->retarget($retarget);
- $logger->info("circulator: found permitted hold ".
- $hold->id . " for copy, capturing...");
+ $logger->info("circulator: found permitted hold ".$hold->id." for copy, capturing...");
$hold->current_copy($copy->id);
$hold->capture_time('now');
+ $hold->shelf_time('now')
+ if $hold->pickup_lib == $self->editor->requestor->ws_ou;
# prevent DB errors caused by fetching
# holds from storage, and updating through cstore
@@ -2061,21 +2062,28 @@
return $self->bail_on_events($evt);
}
- # The transit is received, set the receive time
- $transit->dest_recv_time('now');
+ # The transit is received, set the receive time
+ $transit->dest_recv_time('now');
$self->bail_on_events($self->editor->event)
unless $self->editor->update_action_transit_copy($transit);
my $hold_transit = $self->editor->retrieve_action_hold_transit_copy($transit->id);
- $logger->info("circulator: Recovering original copy status in transit: ".$transit->copy_status);
- $copy->status( $transit->copy_status );
+ $logger->info("circulator: Recovering original copy status in transit: ".$transit->copy_status);
+ $copy->status( $transit->copy_status );
$self->update_copy();
return if $self->bail_out;
my $ishold = 0;
if($hold_transit) {
- #$self->do_hold_notify($hold_transit->hold);
+ my $hold = $self->editor->retrieve_action_hold_request($hold_transit->hold);
+
+ # hold has arrived at destination, set shelf time
+ $hold->shelf_time('now');
+ $self->bail_on_events($self->editor->event)
+ unless $self->editor->update_action_hold_request($hold);
+ return if $self->bail_out;
+
$self->notify_hold($hold_transit->hold);
$ishold = 1;
}
Modified: branches/rel_1_6/Open-ILS/src/sql/Pg/950.data.seed-values.sql
===================================================================
--- branches/rel_1_6/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2009-08-20 20:56:39 UTC (rev 13908)
+++ branches/rel_1_6/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2009-08-20 21:13:08 UTC (rev 13909)
@@ -1878,7 +1878,7 @@
INSERT INTO action_trigger.event_definition (id, active, owner, name, hook, validator, reactor, delay, delay_field, group_field, template)
- VALUES (5, 'f', 1, 'Hold Ready for Pickup Email Notification', 'hold.available', 'HoldIsAvailable', 'SendEmail', '30 minutes', 'capture_time', 'usr',
+ VALUES (5, 'f', 1, 'Hold Ready for Pickup Email Notification', 'hold.available', 'HoldIsAvailable', 'SendEmail', '30 minutes', 'shelf_time', 'usr',
$$
[%- USE date -%]
[%- user = target.0.usr -%]
More information about the open-ils-commits
mailing list