From eb7f7962accc2d095011a6f73b59301ce0025c1c Mon Sep 17 00:00:00 2001 From: erickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4> Date: Thu, 9 Sep 2010 21:09:25 +0000 Subject: [PATCH] added alternate issuance flesh call that only fleshes the subscription; used for public/opac display git-svn-id: svn://svn.open-ils.org/ILS/trunk@17553 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../src/perlmods/OpenILS/Application/Serial.pm | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Serial.pm b/Open-ILS/src/perlmods/OpenILS/Application/Serial.pm index fff0f9926d..0bd7e74e66 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Serial.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Serial.pm @@ -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 -- 2.11.0