Aging Circulations

Use case

Aging circulations helps to protect patron privacy and save disk space.

Evergreen allows for the bulk anonymization of circulation histories. Evergreen calls 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 <Aged Circulation> text and the link to the patron record is removed.

In the client, <Aged Circulation> 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.

Global Flags

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 Item - determines how many circulations 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 preferences (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 item flag)

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.

Just aging circulations is not sufficient to protect patron circulation history. Fully protecting these data would also involve a thoughtful 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. Its behavior is controlled by two internal flags: history.circ.retention_age and history.circ.retention_count.

The purge_circulations function is often run from a cron via the purge_circulations.srfsh script.

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

When a circulation is aged, billings and payments linked to the circulation are migrated from the active billing and payment tables to the money.aged_billing and money.aged_payment tables.

currently grocery bills are ignored and not aged.