added alternate issuance flesh call that only fleshes the subscription; used for...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 9 Sep 2010 21:09:25 +0000 (21:09 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 9 Sep 2010 21:09:25 +0000 (21:09 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@17553 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Serial.pm

index fff0f99..0bd7e74 100644 (file)
@@ -320,6 +320,35 @@ sub fleshed_serial_issuance_retrieve_batch {
         });
 }
 
+__PACKAGE__->register_method(
+    method  => "pub_fleshed_serial_issuance_retrieve_batch",
+    api_name    => "open-ils.serial.issuance.pub_fleshed.batch.retrieve",
+    signature => {
+        desc => q/
+            Public (i.e. OPAC) call for getting at the sub and 
+            ultimately the record entry from an issuance
+        /,
+        params => [{name => 'ids', desc => 'Array of IDs', type => 'array'}],
+        return => {
+            desc => q/
+                issuance objects, fleshed with subscriptions
+            /,
+            class => 'siss'
+        }
+    }
+);
+sub pub_fleshed_serial_issuance_retrieve_batch {
+    my( $self, $client, $ids ) = @_;
+    return [] unless $ids and @$ids;
+    return new_editor()->search_serial_issuance([
+        { id => $ids },
+        { 
+            flesh => 1,
+            flesh_fields => {siss => [ qw/subscription/ ]}
+        }
+    ]);
+}
+
 
 ##########################################################################
 # unit methods