Skip to content

[MR Analytics] Error message "hiding" below the fold

What does this MR do?

Fix MR Analytics no chart data info

The check performed to see if there was chart data was incorrect. This MR resolves that.

We were simply checking the .lenth of the data, but we actually needed to check the count for each individual month. It's correct that technically having total counts of 0 every month is still having data, but we want to hide the chart in those instances!

How to test:

  1. Make sure you have starter plan.
  2. Enable the feature: Feature.enable(:project_merge_request_analytics)
  3. Navigate to the page: some project / analytics / Merge Requests
  4. Select a date range with no data

Screenshots (strongly suggested)

Before After
Screenshot_2020-10-20_at_18.46.59 Screenshot_2020-10-20_at_18.46.07

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

Related to #270104 (closed)

Edited by Brandon Labuschagne

Merge request reports