Skip to content

Prevent Iteration burndown charts trend line going backwards in time

What does this MR do and why?

Fix iteration burndown lines sometimes going backwards.
The data we fetch is sparse, then we pad empty days with the values from the previous day (as no data means no events for that day).
If we were missing data from the second last day, and a timezone was pre-UTC, then we were incorrectly checking "has data for last day" for the wrong day.

Testing

  1. From the project sidebar, Manage > Iterations, then select an Iteration from the Done list (so due date is in the past) Screenshot_2023-04-12_at_17.18.46
  2. In devtools, click the 3 dots menu, More Tools > Sensors, and set a timezone that is before UTC Screenshot_2023-04-12_at_17.10.21
  3. Check that line doesn't go backwards. Or for iterations with no events, confirm the line goes all the way to the end

Screenshots or screen recordings

before after
Screenshot_2023-04-12_at_17.20.31 Screenshot_2023-04-12_at_17.20.42

MR acceptance checklist

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

Related to #383607 (closed)

Edited by Simon Knox

Merge request reports