Skip to content

Fix showing Avg: NaN · Max: NaN in MR analytics

What does this MR do and why?

Updates the MR analytics charts to correctly handle empty / no data.

  • Updates the single stat to display - when there is no data and to use numeric values instead of strings
  • Updates the avg / max calculations to avoid NaN appearing

Screenshots or screen recordings

Before - No data After - No data Before - Data After - Data
Screen_Shot_2022-05-25_at_5.27.56_pm Screen_Shot_2022-06-06_at_2.25.12_pm Screen_Shot_2022-06-06_at_2.17.39_pm Screen_Shot_2022-06-06_at_2.16.51_pm

How to set up and validate locally

  1. Create a new project
  2. Navigate to merge request analytics
  3. Create some issues / MRs
  4. Return to the chart

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

Edited by Ezekiel Kigbo

Merge request reports

Loading