Skip to content

Support updatable automation start date

euko requested to merge 367493-automation-start-date into master

What does this MR do and why?

Issue #367493 (closed)

Background

Iterations Cadence (cadence for short) is a container for iterations. For those cadences that are automatically managed (automatic=true), their start dates correspond to the start dates of their earliest starting iterations. Once the start date of a cadence becomes a past date, it cannot be changed.

As seen in the next demo, I can create a new Iterations Cadence to start on July 1, 2022 and the start date cannot be changed after. Using the entered start date and automation parameters, iterations are automatically scheduled/created. The first iteration scheduled would start on the start date of the cadence.

demo

Problem & solutions shipped in this MR

A user might want to change when iterations are scheduled. To continue from the previous demo, I may want upcoming iterations to be scheduled starting from Aug 10th.

In this MR, we are updating the Iterations Cadence feature so that users can update cadence start dates under certain conditions: as long as a date doesn't overlap with the current or past iterations, it can be used as the new start date for a cadence.

In addition we are going to impose an additional constraint: you cannot choose a start date that would retroactively create past iterations. In the earlier demo video, choosing July 17th as the start date resulted in a past iteration being created. Why? 1. we don't see a compelling reason to allow this business-wise. 2. the feature can be possibly abused. 3) it simplifies the cadence model logic now that the start date attribute can be changed.

How to set up and validate locally & Screenshots or screen recordings

The changes are behind a FF that's default-enabled, :iteration_cadences.

Scenario: Picking a start date that would create a past iteration returns an error.

image

Scenario: Updating to a start date that overlaps with current or past iterations returns an error.

image

Scenario: Updating to a future start date adjusts all of the upcoming iterations.
Before Update demo After
before update_demo after

Sometimes the worker that creates iterations isn't immediately run locally. Please note the cadence ID and run this code in the Rails console:

cadence_id = 8022
Iterations::Cadences::CreateIterationsWorker.new.perform(cadence_id)

UI text changes

Before After
image image

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 euko

Merge request reports

Loading