Skip to content

Draft: Add ability to mark as done todos with closed target state

Ethan Strike requested to merge es-add-mark-closed-todos-done into master

What does this MR do and why?

This MR adds functionality to mark as done all todos whose target state is equivalent to closed. Specifically, if the todo would have a target state pill, it would be closed. The table below captures the target states for which a todo is closed.

Target Type Target State
Issue Closed
Merge Request Merged/Closed
Alert Resolved
Epic Closed

This MR adds a new filter parameter to the todo dashboard called target_attr. Right now it takes only one value, closed. To be functional, the UI will need an update to add a dropdown selection menu to select the filter.

The filtering scope that this MR addresses is not possible with the filtering menus as it is based on the state attribute of the todo target object. The current filters work only on attributes of the todo object itself.

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

  1. Visit any project and create two issues
  2. Create todos for both issues
  3. Close one of the issues
  4. Visit the To-do List
  5. Add &target_attr=closed as a parameter

The result should be that only closed or merged target objects are displayed. The UI does not currently support it, but those todos could then be closed by clicking Mark all as done.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Ethan Strike

Merge request reports