teach open-ils.acq.lineitem.retrieve more fleshing
authorGalen Charlton <gmc@equinoxinitiative.org>
Fri, 1 Nov 2019 01:08:31 +0000 (21:08 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Thu, 16 Jan 2020 21:38:28 +0000 (16:38 -0500)
In particular, teach it how to flesh the LI provider,
Vandelay queue, and claim policy so that Angular LI search
can display them without having to make additional server
requests.

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Lineitem.pm

index af491b6..2ed6dae 100644 (file)
@@ -129,6 +129,9 @@ flesh_attrs         : for attributes,
 flesh_notes         : for notes,
 flesh_cancel_reason : for cancel reason,
 flesh_li_details    : for order details objects,
+flesh_provider      : for provider,
+flesh_claim_policy  : for claim policy,
+flesh_queued_record : for queued bib record from Vandelay,
 clear_marc          : to clear marcxml from lineitem/, type => 'hash'},
         ],
         return => {desc => 'lineitem object on success, Event on error'}
@@ -163,6 +166,9 @@ sub retrieve_lineitem_impl {
     push(@{$fields->{acqlin}},    'alert_text') if $$options{flesh_notes};
     push(@{$fields->{jub}   }, 'order_summary') if $$options{flesh_order_summary};
     push(@{$fields->{jub}   }, 'cancel_reason') if $$options{flesh_cancel_reason};
+    push(@{$fields->{jub}   },      'provider') if $$options{flesh_provider};
+    push(@{$fields->{jub}   },  'claim_policy') if $$options{flesh_claim_policy};
+    push(@{$fields->{jub}   }, 'queued_record') if $$options{flesh_queued_record};
 
     if($$options{flesh_li_details}) {
         push(@{$fields->{jub}   }, 'lineitem_details');