User Tools

Site Tools


evergreen-reports:sql:auditor

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;
evergreen-reports/sql/auditor.txt · Last modified: 2024/02/07 16:09 by jventuro

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.