LP1525394 SIP patron part level holds respond blank user/blake/LP1525394_SIP_patron_part_level_holds_respond_blank
authorblake <blake@mobiusconsortium.org>
Fri, 11 Dec 2015 21:28:17 +0000 (15:28 -0600)
committerblake <blake@mobiusconsortium.org>
Fri, 11 Dec 2015 21:28:17 +0000 (15:28 -0600)
Added code to flesh part level hold information in SIP/Patron.pm
In order to test this, you will need to identify a patron who has
a part level hold. Query SIP with a 63 message like:

6300120151211    104201     Y    AOhidden|AApatronbarcode|AC|AY1AZF08D

and the server should respond with the title in the |CD field for that
part level hold.

Signed-off-by: blake <blake@mobiusconsortium.org>
Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm

index ac4f05c..a668e41 100644 (file)
@@ -626,6 +626,10 @@ sub __hold_to_title {
         $e->retrieve_asset_copy($hold->target)) 
         if $hold->hold_type eq 'C' or $hold->hold_type eq 'F' or $hold->hold_type eq 'R';
 
+    return __part_to_title($e,
+        $e->retrieve_biblio_monograph_part($hold->target))
+        if $hold->hold_type eq 'P';
+
     return __volume_to_title($e, 
         $e->retrieve_asset_call_number($hold->target))
         if $hold->hold_type eq 'V';
@@ -649,6 +653,12 @@ sub __copy_to_title {
     return __volume_to_title($e, $vol);
 }
 
+sub __part_to_title {
+    my( $e, $part ) = @_;
+    #syslog('LOG_DEBUG', "OILS: part_to_title(%s)", $part->id);
+
+    return __record_to_title($e, $part->record);
+}
 
 sub __volume_to_title {
     my( $e, $volume ) = @_;