Skip to content

Display error message when an existing stage name is used

What does this MR do and why?

Displays an error message when an existing custom stage name is used

This MR:

  • Ensures that we check all the existing stage names when running the stage validation in the VSA form.
  • Add rspec test for duplicate stage names
  • Pass all existing stage names to validateStage

Note

An improvement would be to only display the error on the latest field, but we would need to make some additional changes to how the field validation occurs, which I think are outside the scope of this immediate fix. We currently validate all stages after certain events, but would need to trigger individual field validation on blur / focus loss instead.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
vsa-duplicate-stages-before vsa-duplicate-stages-after

How to set up and validate locally

  1. Create a new group
  2. Visit VSA page: Analyze -> Value Stream Analytics
  3. Click Create new Value stream from the value stream dropdown
  4. Click the 'Create from no template' radio button in the form
  5. Enter a name for the first stage
  6. Click the 'Add another stage' button
  7. Enter the same name for the new stage
  8. Click the 'Add another stage' button
  9. An error should appear indicating duplicate stage names

Related to #415513 (closed)

Edited by Ezekiel Kigbo

Merge request reports

Loading