Skip to content

Add approximate duration function

Ezekiel Kigbo requested to merge ek-extend-total-time-component into master

What does this MR do?

!18991 (merged) introduced a new endpoint for cycle analytics stage median calculation, part of the change included returning the median value as a integer in seconds, previously the median used distance_of_time_in_words to convert to an approximate time. This adds similar functionality to the FE.

  • Adds a limitToDays option to the parseSeconds function
  • Adds an approximateDuration function to mimic distance_of_time_in_words. I've only implemented up to the level of days since that's all I current require for !19278 (merged) and we can always add more durations
  • Adds missing specs for the analytics/cycle_analytics/total_time_component

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by 🤖 GitLab Bot 🤖

Merge request reports

Loading