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
- Create a new group
- Visit VSA page:
Analyze -> Value Stream Analytics
- Click
Create new Value stream
from the value stream dropdown - Click the 'Create from no template' radio button in the form
- Enter a name for the first stage
- Click the 'Add another stage' button
- Enter the same name for the new stage
- Click the 'Add another stage' button
- An error should appear indicating duplicate stage names
Related to #415513 (closed)
Edited by Ezekiel Kigbo