Fix part holds in reporter.hold_request_record
authorThomas Berezansky <tsbere@mvlc.org>
Fri, 15 Jul 2011 19:54:35 +0000 (15:54 -0400)
committerMike Rylander <mrylander@gmail.com>
Fri, 15 Jul 2011 23:30:25 +0000 (19:30 -0400)
Specifically, make them show a bib id, instead of null.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/sql/Pg/reporter-schema.sql

index 85b5c54..25532b6 100644 (file)
@@ -266,6 +266,8 @@ SELECT      id,
                        THEN (SELECT cn.record FROM asset.call_number cn JOIN asset.copy cp ON (cn.id = cp.call_number) WHERE cp.id = ahr.target)
                WHEN hold_type = 'M'
                        THEN (SELECT mr.master_record FROM metabib.metarecord mr WHERE mr.id = ahr.target)
+        WHEN hold_type = 'P'
+            THEN (SELECT bmp.record FROM biblio.monograph_part bmp WHERE bmp.id = ahr.target)
        END AS bib_record
   FROM action.hold_request ahr;