Allow updating resolver and resolving note of a decision
What does this MR do and why?
Allow updating resolver and resolving note of a decision
The user or comment recorded as resolving a decision can be wrong and needs correcting afterwards. Resolution fields are written by the resolve step, so a value set on an open decision would be silently overwritten on resolve; they are now limited to resolved decisions, and archived decisions reject updates altogether.
First of two MRs towards supporting the updating of options.
Related to #629049 (closed)
FE integration notes
This MR extends the existing workItemDecisionUpdate mutation (WorkItemDecisionUpdateInput). No new mutation, no new widget wiring needed.
New arguments
resolvedById(UserID): updates who resolved the decision. Send only the user's Global ID now, e.g.gid://gitlab/User/123.resolvingNoteId(NoteID): updates id of the comment that resolved the decision.
New validation to handle
resolutionRationale,resolvedById, andresolvingNoteIdcan now only be updated on RESOLVED decisions (resolvedAtset). Sending them on an open decision returns a payload error likeResolution rationale can only be updated on resolved decisions. This is a behaviour change: editingresolutionRationaleon open decisions used to work (unintended oversight).- ARCHIVED decisions (
state: ARCHIVED) reject every update withArchived decisions cannot be updated. Hide or disable the Edit action for archived decisions. resolvedById: fails withResolver must have access to the work itemif the user lacks read access, or if the id doesn't resolve to a user.resolvingNoteId: fails withNote cannot resolve this decisionif the note isn't a regular comment on the same work item, or if the id doesn't resolve to a note.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #629049 (closed)