<tag>bibs</tag>
<iteration>1</iteration>
<heading>Count</heading>
- <query>SELECT COUNT(eg) FROM bib_id_map</query>
+ <query>SELECT COUNT(id) FROM biblio_record_entry_stage WHERE x_migrate = TRUE</query>
</report>
<report>
<tag>bibs</tag>
<iteration>0</iteration>
<heading>Count</heading>
- <query>SELECT COUNT(eg) FROM bib_id_map where eg::INTEGER NOT IN (SELECT DISTINCT record FROM asset_call_number)</query>
+ <query>SELECT COUNT(id) FROM biblio_record_entry where id NOT IN (SELECT DISTINCT record FROM asset_call_number)</query>
</report>
<report>
</query>
</report>
+ <!-- NOTICES REPORTS -->
+
+ <report>
+ <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
+ 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)
+ OR ed.owner IN (SELECT DISTINCT parent_ou FROM actor.org_unit WHERE id in (SELECT DISTINCT home_ou FROM actor_usr));
+ </query>
+ </report>
+
+ <report>
+ <name>notices_count</name>
+ <tag>notices</tag>
+ <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) || '...'
+ 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
+ WHERE ed.owner IN (SELECT DISTINCT home_ou FROM actor_usr)
+ OR ed.owner IN (SELECT DISTINCT parent_ou FROM actor.org_unit WHERE id in (SELECT DISTINCT home_ou FROM actor_usr))
+ GROUP BY 2,3,4;
+ </query>
+ </report>
+
+
</reports_file>