Skip to content

Handle ca custom form server errors

Ezekiel Kigbo requested to merge fix-handle-ca-custom-form-server-errors into master

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 the custom_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

  1. Navigate to http://localhost:3001/-/analytics/value_stream_analytics
  2. Select a group
  3. Click the Add a stage button
  4. Fill out the fields, but use issue (lowercase) in the name field
  5. Click submit, the backend will return a 422 error, and a message should appear underneath the name field
  6. Change the name to something of your choosing, then submit again
  7. The new stage should be persisted

Screenshots

Errors will now display below the relevant field

Screen_Shot_2020-02-11_at_12.48.31_pm

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
Edited by Ezekiel Kigbo

Merge request reports