first cut of kmig-status
[migration-tools.git] / mig-xml / evergreen_staged_report.xml
index 81f3cc1..050df4a 100644 (file)
     </report>
 -->
 
+<!-- adding sample pie chart report
+    <report>
+        <name>current_holds_by_state</name>
+        <tag>holds</tag>
+        <iteration>0</iteration>
+        <display>pie_chart</display>
+        <report_title>Holds by Current State (7 days)</report_title>
+        <heading>Captured.Fulfilled.Canceled.Targeted.Waiting</heading>
+        <chart_labels>Hold Type.Count</chart_labels>
+        <query> SELECT
+            (SELECT COUNT(*) FROM action.hold_request WHERE fulfillment_time IS NULL AND capture_time > NOW() - '7 days'::INTERVAL AND cancel_time IS NULL),
+            (SELECT COUNT(*) FROM action.hold_request WHERE fulfillment_time > NOW() - '7 days'::INTERVAL AND capture_time IS NOT NULL AND cancel_time IS NULL),
+            (SELECT COUNT(*) FROM action.hold_request WHERE fulfillment_time IS NULL AND cancel_time > NOW() - '7 days'::INTERVAL),
+            (SELECT COUNT(*) FROM action.hold_request WHERE fulfillment_time IS NULL AND capture_time IS NULL AND cancel_time IS NULL AND current_copy IS NOT NULL),
+            (SELECT COUNT(*) FROM action.hold_request WHERE fulfillment_time IS NULL AND capture_time IS NULL AND cancel_time IS NULL AND current_copy IS NULL)
+        </query>
+    </report>
+
+-->
+
     <!-- CIRC REPORTS -->
     <report>
         <name>circ_count</name>
         <report_title>Copies by Location</report_title>
         <tag>assets</tag>
         <iteration>0</iteration>
-        <heading>Copy Count.Library.Circ Library</heading>
+        <heading>Copy Count.Location.Circ Library</heading>
         <query>SELECT COUNT(ac.id), acl.name, aou.name FROM m_asset_copy_legacy ac JOIN asset.copy_location acl ON acl.id = ac.location JOIN actor.org_unit aou ON aou.id = ac.circ_lib WHERE ac.x_migrate = TRUE GROUP BY 2, 3 ORDER BY 2, 3</query>
     </report>
 
@@ -1135,8 +1155,6 @@ id = ac_sc.owner GROUP BY 2,3 ORDER BY 2,3</query>
         <heading>ID.Active.Owner.Name</heading>
         <query>SELECT ed.id, ed.active::TEXT, aou.shortname, ed.name
             FROM action_trigger.event_definition ed 
-        <query>SELECT ed.id, ed.active::TEXT, aou.shortname, ed.name
-            FROM action_trigger.event_definition ed 
             JOIN actor.org_unit aou ON aou.id = ed.owner 
             WHERE ed.owner IN (SELECT DISTINCT home_ou FROM m_actor_usr)
             OR ed.owner IN (SELECT DISTINCT parent_ou FROM actor.org_unit WHERE id in (SELECT DISTINCT home_ou FROM m_actor_usr));