Support deleting decisions
What
Add support for deleting decisions from the decision log.
This builds on the storage and retrieval work in #615863 (closed) and the CRUD API work in #603067 (closed).
How
- Add a delete mutation/API for decisions (and cascade to their options/associated records where applicable).
- Enforce the appropriate permissions and feature flag gating.
- Add specs covering the delete paths.
Specifics
- Hard deletes (destroys record)
- Cascade deletes when work items are deleted (
✅ already covered by DB) - API for hard deletes (destroys decision record)
- Should apply only to open decisions
- Resolved decisions should not be able to be manually destroyed. They can only be cascade deleted.
- Cascade deletes when work items are deleted (
- Soft deletes (record stays)
- API for soft deleting resolved decisions
- Decision record stays, but should be marked with an "archived" state
- We should add a
statusattribute, containing the followingactive/resolved/archivedin an enum.- Note: start the enums at 1 instead of 0 in case we want to switch to FixedItemsModel later
- We should add a
- Decision record stays, but should be marked with an "archived" state
- API for soft deleting resolved decisions
- User must have write permissions to delete a decision
- This should all be behind the
decision_logFF
Related
- Storage and retrieval: #615863 (closed)
- CRUD API for decisions: #603067 (closed)
Edited by Richard Chan