Value stream analytics - top labels causing error when tasks_by_type_chart feature flag not enabled
requested to merge 211453-value-stream-analytics-top-labels-causing-error-when-tasks_by_type_chart-feature-flag-not into master
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 thefetchTopRankedGroupLabels
request - Moves the dispatch for
fetchTasksByTypeData
tofetchTopRankedGroupLabelsSuccess
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
- Enable the required feature flags, and ensure you have the appropriate license
- Navigate to value stream analytics in the analytics space, ie
http://localhost:3001/-/analytics/value_stream_analytics
- Open the browser console
- Select the
gitlab org
group from the dropdown - There should be a request made to
/analytics/type_of_work/tasks_by_type/top_labels...
- Disable the
tasks_by_type_chart
request - Repeat the steps above, there should not be a request made
Screenshots
No visual changes
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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