wiki:devRecalls

Notes from Nov. 3, 2010

Hold targeter cron - every 45 minutes --> Finds target copy

(action.hold_request).target_copy -> action.circ: due_date - checkout_time (action.hold_request).current_copy -> action.circ: due_date - checkout_time

aous.recall_threshold (21 days, 14 days) >= due_date - checkout_tim

aous.recall_min_threshold_notify (3 days, 7 days): due_date > now > now() + aous.rmtn

aous.recall_fine_level -> apply to action.circ

mark renewal_remaining = 0

email via a reactor -> to patron (if e-mail address) + staff

Tasks - defined by noon

1) Add event to O:A:S:action when a hold is targeted

2) Create the email template (action_trigger.event_definition row for previous event)

3) Validator + Reactor for recalls (O:Trigger?)

4) Test data + test scenarios

5) Create AOUS entries

6) Order Dan an Arches 70 tablet

Learning from Dan

We need to identify where the event will occur. The event should be at the point when the hold copy is identified. In this case, we modify:

/openils/lib/perl5/OpenILS/Application/Storage/Publisher/action.pm

and add this logic:

  if ($best) {
    $hold->update( { current_copy => ''.$best->id, prev_check_time => 'now' } );
      $log->debug("\tUpdating hold [".$hold->id."] with new 'current_copy' [".$best->id."] for hold fulfillment.");

      # addition for recalls trigger starts here
      my $fm_hold = $hold->to_fieldmapper;
      my $ses = OpenSRF::AppSession->create('open-ils.trigger');
      $ses->request('open-ils.trigger.event.autocreate',
        'circ.recall.target', $fm_hold, $fm_hold->pickup_lib);
      # ends here - Nov. 3, 2010
  } 

Test Scenario

Evan checks out Apache Derby

Evan checks out Apache Derby

Brendan decides to place a hold.

Testing Details

  (evan) userid: rhynoe@uwindsor.ca password: e21862000111111
  (brendan) userid: rhynob@uwindsor.ca password: b21862000222222
  (apache derby) barcode: 31862000111111

  evan has signed out

Result

The pertinent code was committed to Evergreen core and will be part of the Evergreen 2.1.0 release.

Last modified 9 years ago Last modified on Feb 15, 2011, 12:14:31 PM

Attachments (1)

Download all attachments as: .zip