Skip to content

Quick action `/iteration` is not available for started Iterations

Summary

The quick action /iteration does not show up if the group contains only "started" Iterations.

Came up during #241406 (comment 411752420).

Steps to reproduce

  • Create an Iteration and make it started (via Iteration.last.start!)
  • Make sure no upcoming Iterations are available (via Iteration.upcoming.size == 0)
  • /iteration does not show up as quick action anymore

Example Project

https://gitlab.com/groups/gitlab-org/-/iterations

What is the current bug behavior?

The quick action /iteration is not available.

What is the expected correct behavior?

The quick action /iteration should be available also for started Iterations.

Relevant logs and/or screenshots

Possible fixes

It seems that find_iterations is using the wrong state value active instead of either upcoming or started which has been changed in !30670 (diffs). We might have forgotten to update this code after !30670 (merged) and this might be a regression.

So, when we pass active to Iteration#filter_by_state used by IterationFinder we fallback to "upcoming". In case of https://gitlab.com/groups/gitlab-org/-/iterations we have one "started" iteration however - no "upcoming".

Maybe we want to pass opened to cover both "started" and "upcoming" iterations.

Edited by Peter Leitzen