Baltor Get started

Library / Code module

Records retention and disposition date calculator

records_retention_schedule

Apply a retention schedule to records: find each trigger date, add the retention period, and mark records due, due soon, on legal hold, waiting for their trigger or retained, with file names checked against a naming pattern.

Files, names only

  • ATTRIBUTION.md 4.9 KB
  • LICENSE 1.0 KB
  • ONET-ATTRIBUTION.md 5.4 KB
  • PROCEDURE.md 2.1 KB
  • README.md 4.6 KB
  • TOOLS.md 2.0 KB
  • component.json 11.4 KB
  • examples/known_good.json 3.3 KB
  • examples/known_wrong.json 461 bytes
  • kit_schema.py 11.4 KB
  • records_retention_schedule.py 8.0 KB
  • test_package.py 6.8 KB

Full files in your harness.

What it takes and gives

Runs with
Python 3.10 or later
Command
python3 records_retention_schedule.py < input.json
Function
records_retention_schedule.run
Required input
as_of, schedule, records

Cases it covers

  • Known wrong example: A record belongs to the class emails, which the schedule does not list, so no retention period applies. Refused as unknown record class.
  • input invalid: refused with exit code 2
  • input not json: refused with exit code 2
  • duplicate record class: refused with exit code 2
  • unknown record class: refused with exit code 2
  • duplicate record id: refused with exit code 2
  • invalid date: refused with exit code 2
  • invalid pattern: refused with exit code 2

Limits and scope

Limits
The helper computes dates; it does not decide the retention periods, which come from law, contracts and policy. It never deletes anything. Time zones are ignored because all dates are calendar dates. Event triggers need the event date in each record.
Work activities
File documents or records; Maintain records, documents, or other files; Maintain regulatory or compliance documentation.

Details

Kind
Code module
Licence
MIT
Declared effects
runs commands
Source
github.com/alisonjieli-png/loop-engine/tools/creative_originals/occupation_task_kits/items/records_retention_schedule
Size
12 files, 61.4 KB
Identity
library.supply.creative_originals.4b7a00c286f5b81fbe7b9d78.e6be83556eaa195e
Version
e6be83556eaa195e855256bc07d57f8d77fc120c74f60a6453c2f216f5ad9fc8

The version is the SHA-256 of the item your harness downloads; every file in it names its own checksum.

Where it is shown

Related components

Something wrong with this item, its rights or its safety? Report it on the support page, or from your harness after a download.