===== Auditor Tables =====
==== Item History ====
**Submission Notes:**
This report was submitted on 2024-02-07 by Jessica Woolford of Bibliomation. It was created by Jessica Woolford
**Version**: Used on Evergreen 3.11
**Data Sources Used**: auditor.asset_copy_history, actor.usr, actor.workstation, config.copy_status
**Purpose**: -- Provides a history of edits made to an individual item.
**Running Tips/Guidelines**: Replace ITEM_ID with the ID of the item from the asset.copy_history table.
SELECT au.usrname AS "User", aw.name AS "Workstation", status.name as "Status", aach.*
FROM auditor.asset_copy_history aach
JOIN config.copy_status status ON aach.status = status.id
LEFT OUTER JOIN actor.workstation aw ON aach.audit_ws = aw.id
LEFT OUTER JOIN actor.usr au ON aach.audit_user = au.id
WHERE aach.id = ITEM_ID ORDER BY audit_time;
==== User History ====
**Submission Notes:**
This report was submitted on 2024-02-07 by Jessica Woolford of Bibliomation. It was created by Jessica Woolford
**Version**: Used on Evergreen 3.11
**Data Sources Used**: auditor.actor_usr_history, actor.usr, actor.workstation, permission.grp_tree
**Purpose**: -- Provides a history of edits made to an individual user (staff or patron).
**Running Tips/Guidelines**: Replace USER_ID with the ID of the user from the actor.usr table.
SELECT au.usrname AS "User", aw.name AS "Workstation", pgt.name AS "Profile", aauh.*
FROM auditor.actor_usr_history aauh
JOIN permission.grp_tree pgt ON aauh.profile = pgt.id
LEFT OUTER JOIN actor.workstation aw ON aauh.audit_ws = aw.id
LEFT OUTER JOIN actor.usr au ON aauh.audit_user = au.id
WHERE aauh.id = USER ORDER BY audit_time;
==== Bib Record History ====
**Submission Notes:**
This report was submitted on 2024-02-07 by Jessica Woolford of Bibliomation. It was created by Jessica Woolford
**Version**: Used on Evergreen 3.11
**Data Sources Used**: auditor.biblio_record_entry_history, actor.usr, actor.workstation
**Purpose**: -- Provides a history of edits made to an individual bibliographic record.
**Running Tips/Guidelines**: Replace RECORD_ID with the ID of the user from the biblio.record_entry table.
SELECT au.usrname AS "User", aw.name AS "Workstation", abreh.* FROM auditor.biblio_record_entry_history abreh
LEFT OUTER JOIN actor.usr au ON abreh.audit_user = au.id
LEFT OUTER JOIN actor.workstation aw ON abreh.audit_ws = aw.id
WHERE abreh.id = RECORD_ID
ORDER by audit_time desc;
==== Circulation Rule History ====
**Submission Notes:**
This report was submitted on 2024-02-07 by Jessica Woolford of Bibliomation. It was created by Jessica Woolford
**Version**: Used on Evergreen 3.11
**Data Sources Used**: auditor.circ_matrix_matchpoint_history, config.rule_circ_duration, config.rule_max_fine, permission.grp_tree
**Purpose**: -- Provides a history of edits made to an individual circulation rule.
**Running Tips/Guidelines**: Replace RULE_ID with the ID of the user from the config.circ_matrix_matchpoint.
select crcd.name AS "Duration Rule", crrf.name AS "Recurring Fine Rule", crmf.name AS "Max Fine Rule", pgt.name AS "Permission Group", accmmh.* from auditor.config_circ_matrix_matchpoint_history accmmh
join config.rule_circ_duration crcd on accmmh.duration_rule = crcd.id
join config.rule_recurring_fine crrf on accmmh.recurring_fine_rule = crrf.id
join config.rule_max_fine crmf on accmmh.max_fine_rule = crmf.id
join permission.grp_tree pgt on accmmh.grp = pgt.id
where accmmh.id = RULE_ID
ORDER BY audit_time;
==== Hold Rule History ====
**Submission Notes:**
This report was submitted on 2024-02-07 by Jessica Woolford of Bibliomation. It was created by Jessica Woolford
**Version**: Used on Evergreen 3.11
**Data Sources Used**: auditor.hold_matrix_matchpoint_history
**Purpose**: -- Provides a history of edits made to hold rules for a given owning library and matching circ modifier.
**Running Tips/Guidelines**: Replace ORG_UNIT with the org unit of the owning library you want to see rules for. Replace CIRC_MOD with the circ modifier or circ modifier part that you want to focus on. Retain the % around it to retrieve a circ mod that contains matching text (for example, all circ modifiers that contain "movie," "dvd," or "book").
SELECT * FROM auditor.config_hold_matrix_matchpoint_history WHERE item_owning_ou = ORG_UNIT AND circ_modifier LIKE '%CIRC_MOD%' ORDER BY audit_time;