From: erickson Date: Fri, 18 Jan 2008 13:59:36 +0000 (+0000) Subject: added attribute fleshing option to the basic pl entry retrieve X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a417e8cf8012791b99a0856b685fb57c7bbf91c2;p=Evergreen.git added attribute fleshing option to the basic pl entry retrieve git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@8415 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm index a5c529d49c..8bcb3a9fc7 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm @@ -194,18 +194,26 @@ __PACKAGE__->register_method( params => [ {desc => 'Authentication token', type => 'string'}, {desc => 'Picklist entry ID to retrieve', type => 'number'}, + {options => 'Hash of options, including "flesh", which fleshes the attributes', type => 'hash'}, ], return => {desc => 'Picklist entry object on success, Event on error'} } ); sub retrieve_picklist_entry { - my($self, $conn, $auth, $pl_entry_id) = @_; + my($self, $conn, $auth, $pl_entry_id, $options) = @_; my $e = new_editor(authtoken=>$auth); return $e->die_event unless $e->checkauth; - my $pl_entry = $e->retrieve_acq_picklist_entry($pl_entry_id) - or return $e->event; + my $pl_entry; + if($$options{flesh}) { + $pl_entry = $e->retrieve_acq_picklist_entry([ + $pl_entry_id, {flesh => 1, flesh_fields => {acqple => ['attributes']}}]) + or return $e->event; + } else { + $pl_entry = $e->retrieve_acq_picklist_entry($pl_entry_id) + or return $e->event; + } my $picklist = $e->retrieve_acq_picklist($pl_entry->picklist) or return $e->event; @@ -215,6 +223,7 @@ sub retrieve_picklist_entry { } + __PACKAGE__->register_method( method => 'delete_picklist_entry', api_name => 'open-ils.acq.picklist_entry.delete',