Skip to content

Value stream analytics - top labels causing error when tasks_by_type_chart feature flag not enabled

What does this MR do?

The request for top n labels is firing even if the tasks_by_type_chart feature flag is not enabled. This is causing an incorrect error message to appear, since the required endpoint also needs the feature flag enabled.

Solution

  • Checks for tasks_by_type_chart before dispatching the fetchTopRankedGroupLabels request
  • Moves the dispatch for fetchTasksByTypeData to fetchTopRankedGroupLabelsSuccess since we require the result of the top labels to make this request
  • Updates specs to reflect changes

Testing

This MR requires 1 feature flag and 2 license flags to be enabled:

  • Feature flag: tasks_by_type_chart
  • Licenses flags: cycle_analytics_for_groups, type_of_work_analytics

Steps

  1. Enable the required feature flags, and ensure you have the appropriate license
  2. Navigate to value stream analytics in the analytics space, ie http://localhost:3001/-/analytics/value_stream_analytics
  3. Open the browser console
  4. Select the gitlab org group from the dropdown
  5. There should be a request made to /analytics/type_of_work/tasks_by_type/top_labels...
  6. Disable the tasks_by_type_chart request
  7. Repeat the steps above, there should not be a request made

Screenshots

No visual changes

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

Closes #211453 (closed)

Edited by Ezekiel Kigbo

Merge request reports