Store a decision edit as a single new custom option when multiple options are selected
What
Follow-up from the discussion in !256870 (merged). When a user edits a resolved decision that has multiple selected options (shown as a comma-separated list in the decision log), we want the edit to work through the modal rather than blocking the field.
Per Nick's suggestion and the agreed approach, instead of disabling the field when there are multiple options, we store whatever the user enters as a new custom option, make it the single selected option, and deselect (reject) the rest.
How
- On editing a decision, accept the entered text as a new custom option.
- Set
selected: falseon all existing options and add the new option withselected: true. - This matches the existing manual-creation flow, which already adds a custom option automatically.
Notes
- For v0, storing the edit as a single custom option is acceptable. Potential wording awkwardness (when a user only wanted to edit part of a comma-separated list) is noted but out of scope for now.
- Confirm behaviour with real data once decision source and autogenerated questions land.
Related
- Parent: Decision Log: Data Model and Backend
- Originating discussion: !256870 (note)
- Related: #629049 (closed)
Edited by Richard Chan