Skip to content

Fix calculations for predefined date ranges in Value Stream Analytics

Rudy Crespo requested to merge rcrespo3-fix-vsa-predefined-date-ranges into master

What does this MR do and why?

Fixes bug discovered in #465200 (comment 1944105273) by using the beginning of the current day to calculate both the start and end dates for the predefined date ranges in the filters dropdown in Value Stream Analytics. It also refactors the date_ranges_dropdown component a bit by display the date range string instead of the number of days selected.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Before After
Screenshot 2024-07-10 at 2.50.15 PM.png Screenshot 2024-07-10 at 2.49.57 PM.png

How to set up and validate locally

  1. Please make sure that you're on the GitLab Ultimate plan.
  2. Visit any group/project that has VSA data or follow these steps:
    1. run FILTER=customizable_cycle_analytics SEED_CUSTOMIZABLE_CYCLE_ANALYTICS=1 bundle exec rake db:seed_fu
    2. Visit the group/project value stream. The group/project URL is present in the output of the command above.
  3. Select the predefined dates ranges and verify that the correct dates are being passed to the created_after and created_before query parameters, and that the correct number of days are being selected.
Edited by Rudy Crespo

Merge request reports