commented out barcode lengths by library because it takes up a lot of space and isn...
[migration-tools.git] / mig-xml / evergreen_staged_report.xml
index 2e973f6..7e9fce3 100644 (file)
         <query>SELECT COUNT(ac.id), acl.name, aou.name, ac.x_migrate::TEXT FROM 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 GROUP BY 2, 3, 4 ORDER BY 2, 3, 4</query>
     </report>
 
-    <report>
+    <!-- report>
         <name>asset_barcode_lengths</name>
         <report_title>Barcode Lengths by Library</report_title>
         <tag>assets</tag>
         <iteration>0</iteration>
         <heading>Count of Barcode.Barcode Length.Library</heading>
         <query>SELECT COUNT(ac.id), LENGTH(ac.barcode), aou.name FROM asset_copy_legacy ac JOIN actor.org_unit aou ON aou.id = ac.circ_lib WHERE ac.x_migrate = TRUE GROUP BY 2, 3 ORDER BY 3, 2</query>
-    </report>
+    </report -->
 
     <report>
         <name>asset_barcode_patterns</name>
@@ -664,9 +664,17 @@ id = ac_sc.owner GROUP BY 2,3 ORDER BY 2,3</query>
         <report_title>Loaded Bibliographic Records</report_title>
         <tag>bibs</tag>
         <iteration>0</iteration>
-        <heading>Count.Loaded</heading>
-        <query>SELECT COUNT(bre.id), bre.x_migrate::TEXT FROM biblio_record_entry_legacy bre WHERE id IN (SELECT id FROM biblio.record_entry WHERE deleted = FALSE) GROUP BY 2 ORDER BY 2</query>
-        <note>False means the records are not deleted.</note>
+        <heading>Count</heading>
+        <query>SELECT COUNT(bre.id) FROM biblio_record_entry_legacy bre WHERE id IN (SELECT id FROM biblio.record_entry) ORDER BY 1</query>
+    </report>
+
+    <report>
+        <name>bibs_loaded</name>
+        <report_title>Loaded Bibliographic Records</report_title>
+        <tag>bibs</tag>
+        <iteration>1</iteration>
+        <heading>Count</heading>
+        <query>SELECT COUNT(bre.id) FROM biblio_record_entry bre WHERE id IN (SELECT id FROM biblio.record_entry) ORDER BY 1</query>
     </report>
 
     <report>
@@ -676,6 +684,16 @@ id = ac_sc.owner GROUP BY 2,3 ORDER BY 2,3</query>
         <iteration>0</iteration>
         <heading>Count</heading>
         <query>SELECT COUNT(id) FROM biblio_record_entry where id NOT IN (SELECT DISTINCT record FROM asset_call_number)</query>
+               <note>These records would not have been loaded.</note>
+    </report>
+
+    <report>
+        <name>bibswuri</name>
+        <report_title>Bibliographic Records With 856$9s</report_title>
+        <tag>bibs</tag>
+        <iteration>0</iteration>
+        <heading>Count</heading>
+        <query>SELECT COUNT(id) FROM biblio_record_entry where id IN (SELECT record FROM asset.call_number WHERE label ~* '##URI##')</query>
     </report>
 
     <report>
@@ -742,12 +760,12 @@ id = ac_sc.owner GROUP BY 2,3 ORDER BY 2,3</query>
     </report>
 
     <report>
-        <name>bib_merges_by_search_format</name>
+        <name>bib_merges_searchformat</name>
         <report_title>Bibliographic Merges By Search Format</report_title>
         <tag>bibs</tag>
         <iteration>0</iteration>
         <heading>Count.Item Type</heading>
-        <query>WITH g AS (SELECT UNNEST(records) FROM groups) SELECT COUNT(record), search_format_str FROM dedupe_batch WHERE record IN (SELECT * FROM g) GROUP BY 2</query>
+        <query>DROP TABLE IF EXISTS temp_unnest; CREATE TABLE temp_unnest AS (SELECT UNNEST(records) FROM groups); SELECT COUNT(record), search_format_str FROM dedupe_batch WHERE record IN (SELECT * FROM temp_unnest) GROUP BY 2 ORDER BY 2</query>
     </report>
 
        <report>
@@ -855,8 +873,8 @@ id = ac_sc.owner GROUP BY 2,3 ORDER BY 2,3</query>
         <heading>Count of Barcodes (greater than 10).Left 60% of Characters</heading>
         <query>SELECT COUNT(acard.id), LEFT(acard.barcode,(ROUND(LENGTH(acard.barcode)*.6))::INT) FROM actor_card acard GROUP BY 2 HAVING COUNT(acard.id) > 10 ORDER BY 2</query>
     </report>
-
-    <report>
+   <report>
         <name>usr_barcode_collisions</name>
         <report_title>Patron Barcode Collisions</report_title>
         <tag>actors</tag>
@@ -1031,6 +1049,17 @@ id = ac_sc.owner GROUP BY 2,3 ORDER BY 2,3</query>
                 ORDER BY 2, 1, 3</query>
     </report>
 
+    <report>
+        <name>usr_settings</name>
+        <report_title>Patron Settings</report_title>
+        <tag>actors</tag>
+        <iteration>0</iteration>
+        <heading>Count.Setting.Value</heading>
+        <query>SELECT COUNT(*), name, 'User''s Phone' FROM actor_usr_setting WHERE name IN ('opac.default_phone') GROUP BY 2, 3 
+                       UNION ALL SELECT COUNT(*), name, value FROM actor_usr_setting WHERE name IN ('opac.hold_notify') GROUP BY 2, 3 
+                       UNION ALL SELECT COUNT(*), a.name, aou.shortname FROM actor_usr_setting a JOIN actor.org_unit aou ON aou.id = REPLACE(a.value,'"','')::INTEGER 
+                               WHERE a.name IN ('opac.default_pickup_location','opac.default_search_location') GROUP BY 2, 3 ORDER BY 2, 3;</query>
+    </report>
 
     <!-- ACQUISITIONS REPORTS -->
     <report>
@@ -1141,9 +1170,9 @@ id = ac_sc.owner GROUP BY 2,3 ORDER BY 2,3</query>
         <name>notices_overview</name>
         <tag>notices</tag>
         <iteration>0</iteration>
-        <report_title>Overview of Notices for Migration</report_title>
-        <heading>ID.Active.Owner.Name.Delay.Validator.Reactor</heading>
-        <query>SELECT ed.id, ed.active, aou.shortname, LEFT(ed.name,25) || '...', ed.delay, ed.validator, ed.reactor 
+        <report_title>Action Triggers Setup for Notices</report_title>
+        <heading>ID.Active.Owner.Name</heading>
+        <query>SELECT ed.id, ed.active, 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 actor_usr)
@@ -1157,7 +1186,7 @@ id = ac_sc.owner GROUP BY 2,3 ORDER BY 2,3</query>
         <iteration>0</iteration>
         <report_title>Count of Notices Run with State</report_title>
         <heading>Count of Notices.State.ID.Owner.Name</heading>
-        <query>SELECT COUNT(ate.id), ate.state, ed.id, aou.shortname, LEFT(ed.name,25) || '...' 
+        <query>SELECT COUNT(ate.id), ate.state, ed.id, aou.shortname, ed.name 
             FROM action_trigger.event_definition ed 
             JOIN actor.org_unit aou ON aou.id = ed.owner 
             JOIN action_trigger.event ate ON ate.event_def = ed.id