Extend value stream create and update actions
What does this MR do?
This MR extends the ValueStream create action to accept stage associations. In order to modify the records, update action was added.
Note: I skipped adding a changelog because the new functionality will be exposed to the end user when the frontend work is done.
Current status
On the value stream UI, user needs to create the value stream record first (request 1). After that the user needs to configure the stages. This is done via a separate form (request 2).
Next (this MR)
The new UI will support creating the value stream record and the stage configuration in one popup window with one API call.
To support the new UI, the API has been extended to accept an array of stages using the accepts_nested_attributes_for rails feature.
Implementation
This MR includes the following:
- Create and Update services for
GroupValueStremmodels with optionalstagesparameters. - Integration with the existing controller. (backward compatible)
- Custom serializer for the validation errors generated by the
GroupValueStreammodel, in order to show the error messages correctly for the nested associations (stage).
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
Related to #296832 (closed)

