LP1528301 Add SIP Support for BF field on type 10 checkin responses user/driscoll/LP1528301_sip_BF_field-signoff
authorblake <blake@mobiusconsortium.org>
Thu, 9 Jun 2016 14:04:56 +0000 (09:04 -0500)
committerMartha Driscoll <driscoll@noblenet.org>
Fri, 3 Mar 2017 20:34:21 +0000 (15:34 -0500)
This little patch will append the BF field in the SIP response during
checkin when the item is for another hold. Some self check software vendors
(ahem Bibliotheca) implement the hold phone number for the next patron this way.
You will need this patch as well as the code change to the SIPServer repo
LP1528301_Add_SIP_Support_for_BF_field_on_type_10_checkin_responses

Signed-off-by: blake <blake@mobiusconsortium.org>
Signed-off-by: Martha Driscoll <driscoll@noblenet.org>
Open-ILS/src/perlmods/lib/OpenILS/SIP/Item.pm
Open-ILS/src/perlmods/lib/OpenILS/SIP/Transaction/Checkin.pm

index 2a98825..f012150 100644 (file)
@@ -46,6 +46,7 @@ my %fields = (
     volume             => 0,
     record             => 0,
     mods               => 0,
+    hold_patron_phone  => 0,
 );
 
 our $AUTOLOAD;
@@ -218,6 +219,7 @@ sub fetch_hold {
 
         syslog('LOG_WARNING', "OILS: Item(".$copy->barcode.
             ") is captured for a hold, but there is no matching hold request") unless $hold;
+        $self->{hold_patron_phone} = $hold->phone_notify unless !$hold;
 
         return $hold;
     }
index c937892..c7ab6aa 100644 (file)
@@ -201,7 +201,8 @@ sub do_checkin {
 
         $self->item->hold_patron_bcode( ($holder->card) ? $holder->card->barcode : '');
         $self->item->hold_patron_name($holder_name);
-        $self->item->destination_loc($pickup_lib_sn); 
+        $self->item->destination_loc($pickup_lib_sn);
+        $self->item->hold_patron_phone($self->item->hold->phone_notify);
 
         my $atype = ($pickup_lib_id == $phys_location) ? '01' : '02';
         $self->alert_type($atype);