Skip to content

Extend value stream create and update actions

Adam Hegyi requested to merge 296832-update-value-stream-create-api into master

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.

image

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.

image

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 GroupValueStrem models with optional stages parameters.
  • Integration with the existing controller. (backward compatible)
  • Custom serializer for the validation errors generated by the GroupValueStream model, in order to show the error messages correctly for the nested associations (stage).

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 #296832 (closed)

Edited by Mark Chao

Merge request reports

Loading