From b5d42fec7674f5807ea669e2368df9c5ee21d1ed Mon Sep 17 00:00:00 2001 From: Jeanette Lundgren Date: Thu, 26 Oct 2017 14:09:40 -0400 Subject: [PATCH] docs: LP1717583 add details about aged circulation Signed-off-by: Jane Sandberg --- docs/admin/aged_circs.adoc | 79 +++++++++++++++++++++++++++++++++++--- 1 file changed, 73 insertions(+), 6 deletions(-) diff --git a/docs/admin/aged_circs.adoc b/docs/admin/aged_circs.adoc index 81e5644f61..3aaeebbfaa 100644 --- a/docs/admin/aged_circs.adoc +++ b/docs/admin/aged_circs.adoc @@ -1,16 +1,51 @@ -Aging circulations +Aging Circulations ------------------ -Every time you attempt to `DELETE` a row from `action.circ`, it +.Use case +**** +Aging circulations helps to protect patron privacy and save disk space. +**** + +Evergreen allows for the bulk anonymization of circulation histories. Evergreen calles this aged circulation. Circulation statistics are preserved (total circs, last checkout/renewal date, checkout/renewal/checkin workstation, etc) but patron information (name : barcode) is replaced with text and the link to the patron record is removed. + +In the client, will show in the patron field in Circulation History Tab and Show Last Few Circulations. + +In the database, every time you attempt to `DELETE` a row from `action.circ`, it copies over the appropriate data to `action.aged_circulation`, then deletes the `action.circ` row. -.Use case -**** +Global Flags +~~~~~~~~~~~~ -Aging circulations helps to protect patron privacy and save disk space. +There are four global flags used for aging circulations. -**** +1. Historical Circulation Retention Age - determines the timeframe for aging circulations based on transaction age (7 days, 14 days, 30 days, etc). + +2. Historical Circulations Per Copy - determines how many ciruclations to keep (ex. 1, 2, 3). If set to 1, Evergreen will always keep the last (most recent) circulation. + +3. Historical Circulations use most recent xact_finish date instead of last circ's (true or false) + +4. Historical Circulations are kept for global retention age at a minimum, regardless of user prefeences (true or false) + + + +What Data is Aged? +~~~~~~~~~~~~~~~~~~ + +Only completed transactions are aged. These circulations have been checked in (returned) and *do not* contain any unpaid fines or bills. + +Data that is not aged includes: + +* open transactions (i.e. checked out) +* closed transactions with unpaid fines +* closed transactions with unpaid bills +* the last X circulation(s) (determined by historical circulations per copy flag) + + +[TIP] +========== +Aging circulations will not affect a patron being able to keep their checkout history. Minimal metadata is stored in the patron checkout history table. Once the corresponding circulation is aged, the full circulation metadata is no longer linked to the patron's reading history. +========== [TIP] ========== @@ -24,3 +59,35 @@ approach to logs and backups of these data. You can create a cron job to automatically age circulations. ========== +How Circulations are Aged +~~~~~~~~~~~~~~~~~~~~~~~~~ + +The action.aged_circulation table is for statistical reporting while breaking the link to the patron who had the item checked out. + +Circulations get moved under three circumstances in stock Evergreen: + +1. A patron is deleted. This moves all of the patron's circulations from action.circulation to action.aged_circulation + +2. A row or row(s) in action.circulation are deleted. The action.age_circ_on_delete trigger moves deleted action.circulations to action.aged_circulation. + +3. The action.purge_circulations function is run. This function is meant to be run periodically to enforce patron privacy. It's behavior is controlled by two internal flags: history.circ.retention_age and history.circ.retention_count. + +[TIP] +========== +The purge_circulations function is often run from a cron via the purge_circulations.srfsh script. +========== + + +[TIP] +========== +The purge_circulations function will take a *long* time to run for the first time on a system that has had much activity. The srfsh script will likely time out before the database function finishes and nothing will get moved. +========== + + +Impacts on Billing Data +~~~~~~~~~~~~~~~~~~~~~~~ + +Rows are deleted from money.materialized_billable_xact_summary when circulations are aged. This table is the basis for billing reports and views. + +NOTE: currently grocery bills are ignored and not aged. + -- 2.43.2