Fix calculations for predefined date ranges in Value Stream Analytics
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 |
---|---|
![]() |
![]() |
How to set up and validate locally
- Please make sure that you're on the GitLab Ultimate plan.
- Visit any group/project that has VSA data or follow these steps:
- run
FILTER=customizable_cycle_analytics SEED_CUSTOMIZABLE_CYCLE_ANALYTICS=1 bundle exec rake db:seed_fu
- Visit the group/project value stream. The group/project URL is present in the output of the command above.
- run
- Select the predefined dates ranges and verify that the correct dates are being passed to the
created_after
andcreated_before
query parameters, and that the correct number of days are being selected.
Edited by Rudy Crespo