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.
ATTRIBUTION.md4.9 KBLICENSE1.0 KBONET-ATTRIBUTION.md5.4 KBPROCEDURE.md2.1 KBREADME.md4.6 KBTOOLS.md2.0 KBcomponent.json11.4 KBexamples/known_good.json3.3 KBexamples/known_wrong.json461 byteskit_schema.py11.4 KBrecords_retention_schedule.py8.0 KBtest_package.py6.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
- Records, schedules and budgetsDeterministic skills
- Dates, times and time zonesCorner cases
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.