Resolving a Design Comment doesn't clear the Todo
Description
I used the top right button to check off and resolve a comment:
#220934[Integrations.png] (comment 370922601)
However, it failed to clear my open todo where I had been mentioned.
Proposal
Resolving a discussion would mark-as-done a Todo that was generated by any comment within that discussion thread (like a reply). We would only mark-as-done a Todo of the user who resolved the discussion, and not any Todos for other users within the discussion.
@alexkalderimis:
Backlog Refinement byDocumentation needed:
Yes, both in design management documentation and for todos.
Test Activity Planned:
- Feature test for happy path (click to resolve comment, TODO not seen on todo list)
- Unit tests for service level
- Controller/Request tests for edge
Security Tests Planned:
None
Explanation for Approach to be taken:
Add behaviour in current resolution mechanism (Discussions::ResolveService
) to
clear the todo matching the note if there is one.
MR Breakdown:
Since this is fixing a bug, rather than adding a new feature, I do not think we need a new feature flag, and can complete this in a single MR.
The feature test could be its own MR if desired.
Weight Estimate: 2
@.luke:
Backlog Refinement byDocumentation needed:
Yes. To the Todos docs.
Test Activity Planned:
Explanation for Approach to be taken:
Todos have an association with the note
as well as to the target
, so we have the data recorded that we need.
The trickiness is that there is more than one way to resolve a discussion: A discussion is a PORO that is considered resolved when all of the comments within it are resolved. Some parts of GitLab resolve a discussion or note without going through the service to do this.
For design management, we could ignore some of that, and just tack some extra logic into Discussions::ResolveService
somewhere, as within design management people can only resolve discussions and not individual notes. In future Notes::ResolveService
could call something similar if needed, in order to trigger the logic when the last note of a discussion is resolved, (or now, if groupsource code also want this feature for merge requests #227691 (comment 381903509)).
MR Breakdown:
- 1-2 MRs to add the feature
- 1 MR to remove the feature flag
Weight Estimate:
3
@toupeira:
Backlog Refinement byDocumentation needed: Describe the new behaviour in https://docs.gitlab.com/ee/user/todos.html#marking-a-to-do-as-done.
Test Activity Planned: Unit specs, and maybe a feature spec to play through the scenario in the browser.
Security Tests Planned: None
Explanation for Approach to be taken: Not sure yet, in case we want to do the same for MR discussions.
MR Breakdown: Not sure yet.
Weight Estimate: 3