Skip to content

feat: Retention management - bewaartermijnen and selectielijsten#957

Merged
rubenvdlinde merged 2 commits intodevelopmentfrom
feature/948/retention-management
Mar 22, 2026
Merged

feat: Retention management - bewaartermijnen and selectielijsten#957
rubenvdlinde merged 2 commits intodevelopmentfrom
feature/948/retention-management

Conversation

@rubenvdlinde
Copy link
Contributor

Summary

  • Implements archival lifecycle management per Archiefwet 1995 with MDTO-compliant metadata, selectielijsten, and automated destruction workflows
  • Adds RetentionService, DestructionCheckJob (TimedJob), DestructionExecutionJob (QueuedJob), RetentionController with legal hold and destruction approval APIs
  • Integrates archival metadata into SaveObject (apply on create, recalculate on update, immutability for destroyed/transferred objects)
  • Adds archival settings API, pre-destruction notifications, destruction certificates, and unit tests

Closes #948

Test plan

  • Verify archival metadata is applied on object creation when schema has archive.enabled: true
  • Verify destroyed objects (archiefstatus=vernietigd) return HTTP 409 on update
  • Verify legal hold placement/release via /api/retention/legal-holds endpoints
  • Verify destruction list approval workflow via /api/retention/destruction-lists/{id}/approve
  • Verify archival settings CRUD via /api/settings/archival
  • Verify unit tests pass for RetentionService, DestructionCheckJob, DestructionExecutionJob
  • Verify no regressions on existing object CRUD operations

Enriched all active specs to 10-15+ requirements with 3-5 GIVEN/WHEN/THEN
scenarios each. Research includes codebase analysis, competitor analysis,
Dutch government standards, and ADR compliance.

Moved 8 specs to their correct app homes (redirect stubs remain).
Reframed 6 specs as extensions of existing functionality.
All specs pass openspec validate --strict.
…948)

Implement archival lifecycle management for register objects per Archiefwet 1995:

- RetentionService: MDTO-compliant archival metadata (archiefnominatie, archiefstatus,
  archiefactiedatum, classificatie, bewaartermijn), selectielijst lookup, legal holds,
  archiefactiedatum calculation with three afleidingswijzen (afgehandeld, eigenschap, termijn)
- DestructionCheckJob: TimedJob scanning for objects past archiefactiedatum, generates
  destruction lists, sends pre-destruction notifications via INotification
- DestructionExecutionJob: QueuedJob processing approved destruction lists in batches,
  re-checks legal holds at execution time, generates destruction certificates
- RetentionController: API endpoints for destruction list approval/rejection with
  multi-step workflow (dual approval for sensitive schemas), legal hold CRUD, bulk holds
- SaveObject integration: archival metadata applied on creation, recalculated on update,
  immutability enforcement for destroyed/transferred objects (HTTP 409)
- Archival settings API: configurable destruction intervals, notification lead days,
  selectielijst/destruction list register/schema references
- Unit tests for RetentionService, DestructionCheckJob, DestructionExecutionJob
- OpenSpec change archived with synced retention-management spec
@github-actions
Copy link
Contributor

Quality Report

Repository ConductionNL/openregister
Commit 7993e98
Branch 957/merge
Event pull_request
Generated 2026-03-22 19:08 UTC
Workflow Run https://github.com/ConductionNL/openregister/actions/runs/23410305812

Summary

Group Result
PHP Quality FAIL
Vue Quality PASS
Security PASS
License PASS
PHPUnit SKIP
Newman SKIP

PHP Quality

Tool Result
lint PASS
phpcs FAIL
phpmd PASS
psalm PASS
phpstan PASS
phpmetrics PASS

Vue Quality

Tool Result
eslint PASS
stylelint PASS

Security

Ecosystem Result
composer PASS
npm PASS

License Compliance

Ecosystem Result
composer PASS
npm PASS

composer dependencies (147 total)

Metric Count
Approved (allowlist) 146
Approved (override) 1
Denied 0

npm dependencies (586 total)

Metric Count
Approved (allowlist) 585
Approved (override) 1
Denied 0

PHPUnit Tests

PHPUnit tests were not enabled for this run.

Integration Tests (Newman)

Newman integration tests were not enabled for this run.


Generated automatically by the Quality workflow.

Download the full PDF report from the workflow artifacts.

@rubenvdlinde rubenvdlinde merged commit 6605c24 into development Mar 22, 2026
34 of 37 checks passed
@rubenvdlinde rubenvdlinde deleted the feature/948/retention-management branch March 22, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant