notes via unapi
authoredoceo <code@edoceo.com>
Sat, 2 Feb 2013 00:22:54 +0000 (16:22 -0800)
committeredoceo <code@edoceo.com>
Tue, 5 Feb 2013 04:33:50 +0000 (20:33 -0800)
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm

index a4af2c6..c2c1c45 100644 (file)
@@ -78,6 +78,7 @@ sub load_record {
     $ctx->{marc_xml} = $rec_data[0]->{marc_xml};
 
     $ctx->{copies} = $copy_rec->gather(1);
+    $ctx->{edoceo} = "Busby is Great";
     $self->timelog("past store copy retrieval call");
     $ctx->{copy_limit} = $copy_limit;
     $ctx->{copy_offset} = $copy_offset;
@@ -191,6 +192,17 @@ sub mk_copy_query {
         $rec_id, undef, undef, $copy_limit, $copy_offset, $self->ctx->{is_staff}
     );
 
+    # Add Copy Notes?
+    # Some How need to Make Notes an Array of Notes
+    # This makes two rows for the record, when there are two copy notes
+    $query->{select}->{acpn} = [
+        {column => 'title', alias => 'note_title'},
+        {column => 'value', alias => 'note_value'}
+    ];
+    $query->{from}->{acp}->{acpn} = {
+        type => 'left'
+    };
+
     if($org != $self->ctx->{aou_tree}->()->id) { 
         # no need to add the org join filter if we're not actually filtering
         $query->{from}->{acp}->{aou} = {