Replace cycle analytics group labels endpoint
What does this MR do?
Follow on from: !24218 (comment 287365367)
We seem to have two endpoints for group labels:
- UI: http://localhost:3001/groups/gitlab-org/-/labels (add .json)
- Includes project labels
- API: http://localhost:3001/api/v4/groups/gitlab-org/labels.json
- Only group labels
This MR update cycle_analytics to fetch the labels from http://localhost:3001/api/v4/groups/gitlab-org/labels.json
, as we do not want to include project-level labels. This ensures that a selected label is available to be used as a label event in the custom stage form.
- Adds a fixture spec to generate the correct labels for
/api/:version/group/:groupid/labels
data - Adds snapshot tests so we can catch missing label titles earlier
- Consolidates
analytics/value_stream_analytics
urls inmock_data
This is all behind the :customizable_cycle_analytics
feature flag
Screenshots
Before - includes project labels | After |
---|---|
![]() |
![]() |
Does this MR meet the acceptance criteria?
Conformity
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
Edited by Yorick Peterse