LP#1053397 basic MR holds support; todo: formats
authorBill Erickson <berick@esilibrary.com>
Tue, 28 Jan 2014 20:12:39 +0000 (15:12 -0500)
committerBill Erickson <berick@esilibrary.com>
Tue, 28 Jan 2014 20:12:39 +0000 (15:12 -0500)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm

index 61b1028..02b729a 100644 (file)
@@ -777,6 +777,20 @@ sub load_place_hold {
     };
 
     my $type_dispatch = {
+        M => sub {
+            my $mrecs = $e->batch_retrieve_metabib_metarecord([
+                \@targets, 
+                {flesh => 1, flesh_fields => {mmr => ['master_record']}}], 
+                {substream => 1}
+            );
+            for my $id (@targets) {
+                my ($mr) = grep {$_->id eq $id} @$mrecs;
+                push(@hold_data, $data_filler->({
+                    target => $mr, 
+                    record => $mr->master_record
+                }));
+            }
+        },
         T => sub {
             my $recs = $e->batch_retrieve_biblio_record_entry(\@targets, {substream => 1});