Handle ca custom form server errors
What does this MR do?
- Correctly handles
422
errors for the custom stage form - Displays returned errors below the relevant field.
- Prevent creating stages with a name of one of the default stages: #35823 (comment 261431773)
- Replace
done
callback with returned promise in thecustom_stage_form_spec.js
Closes #36685 (closed)
Feature flags
Requires the :customizable_cycle_analytics
feature flag to be enabled
Testing
You will need to have the :customizable_cycle_analytics
feature flag enabled
- Navigate to http://localhost:3001/-/analytics/value_stream_analytics
- Select a group
- Click the
Add a stage
button - Fill out the fields, but use
issue
(lowercase) in thename
field - Click submit, the backend will return a 422 error, and a message should appear underneath the
name
field - Change the name to something of your choosing, then submit again
- The new stage should be persisted
Screenshots
Errors will now display below the relevant field
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
Edited by Ezekiel Kigbo