Support updating decisions
What
Add support for updating existing decisions in the decision log.
This builds on the storage and retrieval work in #615863 (closed) and the CRUD API work in #603067 (closed).
How
- Add an update mutation/API for decisions (and their options where applicable).
- Enforce the appropriate permissions and feature flag gating.
- Add specs covering the update paths.
The specifics
What's needed
- Resolving open decisions (
✅ already covered in write API MR) - Resolved decisions are immutable (
✅ already covered on BE side) - Users can edit the following for both resolved and open decisions:
- Description
- Title (the open question)
- Resolution rationale
- Discussion id
- Source link
- The only restriction for the above: an update cannot make these fields blank/empty/nil. Logically, it doesn't make sense to remove any of these for the first iteration.
- All users with write access to the decision log should be able to edit
Future / beyond v0
- Adding/removing/updating* options
- *This includes updating which option(s) are selected as well. This requires some further discussion and planning, as this path will then lead to the question of whether we should update resolved_by_id, resolved_at, and resolving_note_id, and whether we should preserve these. I feel this goes into activity feed / supersede / reopening resolved decisions territory, so for simplicity, the first MR will only update the fields mentioned in the previous section.
- Supersedes
- Tracking updates in the activity feed
- Reopening resolved decisions
Related
- Storage and retrieval: #615863 (closed)
- CRUD API for decisions: #603067 (closed)
Edited by Richard Chan