Dismiss todos upon merge or closure of associated Merge Request

Summary

Todo raised automatically by Merge Request being assigned, should be automatically marked 'done' by MR being merged/closed. This would avoid Todos accumulating.

Improving this is desirable for people using GitLab primarily as a repo & for merge requests (not as a task management system), to not find the Todo feature filled with outdated litter. If they ever do look at the Todos, finding it full of outdated items raised automatically but no longer relevant will be very effective in putting people off using this feature.

This will improve the usefulness of Todos, and encourage users to genuinely use the feature.

GitLab Community Edition 9.4.5

Steps to reproduce

  1. Have a project with a few developers needing code review.
  2. Have Merge Requests assigned to you. Receive these by email or verbally.
  3. Review and merge the MRs.
  4. Eventually, go to the Todo list and see the large number of outdated items there.

What is the current bug behavior?

GitLab automatically creates a Todo on MR creation/ assignment. GitLab does not automatically close the Todo on MR merge/ closure.

What is the expected correct behavior?

GitLab automatically closes (mark as 'done') the Todo on MR merge/ closure.

Relevant logs and/or screenshots

Output of checks

Results of GitLab environment info

GitLab Community Edition 9.4.5 140292ee

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:env:info)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

(If you can, link to the line of code that might be responsible for the problem)

Edited by Thomas Whitmore