Skip to content

VSA correctly display `0` and `no value` days for total time chart

Ezekiel Kigbo requested to merge 368304-stage-time-chart-zero-values into master

What does this MR do and why?

This MR fixes inconsistencies with how we render the total / stage time charts in value stream analytics. The data set from the api currently only returns data points for days where we have a value calculated. This has caused confusion since the rendered chart does not accurately reflect the date range selected.

This MR:

  • Ensures the chart contains a data point for every date in the date range
  • Renders a dotted line for dates that have a null value
  • Correctly render dates that have a value, but the value is 0

Screenshots or screen recordings

Before After
Screen_Shot_2022-09-01_at_6.28.19_pm Screen_Shot_2022-09-01_at_6.29.08_pm

Tooltip states (After)

With null data With 0 value With a mixture
Screen_Shot_2022-09-01_at_6.03.10_pm Screen_Shot_2022-09-01_at_6.03.00_pm Screen_Shot_2022-09-01_at_6.03.40_pm

How to set up and validate locally

Creating a group level value stream

  1. Ensure you have an EE license, or stub the cycle_analytics_for_groups license feature to true
  2. Create a group
  3. Create a project within a group (I recommend creating a project from a template such as the rails template)
  4. Create a custom value stream for the new group you created
    Note: The first time you create a value stream in a group, a data aggregation needs to run, in gdk this is usually ~10mins, proceed to make a coffee in the meantime, relax 😎

Seeding data

  1. Seed some test VSA data

    $ VSA_SEED_PROJECT_ID=<project-id> VSA_ISSUE_COUNT=10 SEED_VSA=true FILTER=cycle_analytics rake db:seed_fu
  2. Navigate to the group value stream for the group you created

  3. Navigate through the different stages in the value stream and hover over the stage time / total time chart to see the popover

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 #368304 (closed)

Edited by Ezekiel Kigbo

Merge request reports