added support for returning the metarecord holds in open-ils.circ.holds.retrieve_all_...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 26 Jan 2009 18:50:59 +0000 (18:50 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 26 Jan 2009 18:50:59 +0000 (18:50 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@11974 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm

index 78d77f7..d12f82e 100644 (file)
@@ -1621,7 +1621,17 @@ sub all_rec_holds {
        $args ||= { fulfillment_time => undef };
        $args->{cancel_time} = undef;
 
-       my $resp = { volume_holds => [], copy_holds => [] };
+       my $resp = { volume_holds => [], copy_holds => [], metarecord_holds => [] };
+
+    my $mr_map = $e->search_metabib_metarecord_source_map({source => $title_id})->[0];
+    if($mr_map) {
+        $resp->{metarecord_holds} = $e->search_action_hold_request(
+            {   hold_type => OILS_HOLD_TYPE_METARECORD,
+                target => $mr_map->metarecord,
+                %$args 
+            }, {idlist => 1}
+        );
+    }
 
        $resp->{title_holds} = $e->search_action_hold_request(
                {