LP1525394 SIP patron part level holds respond blank
authorblake <blake@mobiusconsortium.org>
Fri, 11 Dec 2015 21:28:17 +0000 (15:28 -0600)
committerJason Boyer <JBoyer@equinoxOLI.org>
Mon, 19 Jul 2021 17:17:32 +0000 (13:17 -0400)
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>
Signed-off-by: Jason Boyer <jboyer@equinoxinitiative.org>
Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm

index c26d8bf..ea31a54 100644 (file)
@@ -717,6 +717,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';
@@ -740,6 +744,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 ) = @_;