add status as a public note in exporter
[Evergreen.git] / Open-ILS / src / perlmods / OpenILS / WWW / Exporter.pm
index 4e42171..fba5fe6 100644 (file)
@@ -154,6 +154,7 @@ sub handler {
 
        my %orgs;
        my %shelves;
+       my %statuses;
 
        my $flesh = {};
        if ($holdings) {
@@ -178,6 +179,16 @@ sub handler {
                }
                $req->finish;
 
+               $req = $ses->request( 'open-ils.cstore.direct.config.copy_status.search', { id => { '!=' => undef } } );
+
+               while (my $s = $req->recv) {
+                       next if ($req->failed);
+                       $s = $s->content;
+                       last unless ($s);
+                       $statuses{$s->id} = $s;
+               }
+               $req->finish;
+
                $flesh = { flesh => 2, flesh_fields => { bre => [ 'call_numbers' ], acn => [ 'copies' ] } };
        }
 
@@ -246,6 +257,7 @@ sub handler {
                                                                                ($cp->holdable eq 'f' ? ( x => 'unholdable' ) : ()),
                                                                                ($cp->circulate eq 'f' ? ( x => 'noncirculating' ) : ()),
                                                                                ($cp->opac_visible eq 'f' ? ( x => 'hidden' ) : ()),
+                                                                               z => $statuses{$cp->status}->name,
                                                                        )
                                                                );