Dynamically check approval group names without requiring a form submission
Problem to solve
When adding an approval rule, the entire form must be submitted to determine if the name is already taken or not.
Intended users
Unknown / Anyone managing a project. Potentially any user with administrative rights to a project.
User experience goal
The name field should respond to input (after a short delay, to avoid overloading the network, api, and the user) by requesting a validation of the approval rule as it currently exists in the UI. That validation should appear where the current error appears, but without requiring that the form be submitted.
Proposal
I propose that we add a small UX improvement to the front end that requests an asynchronous validation of the approval rule in the form. Such a request would require new back end work, as I propose is #241173. The front end can then extract the relevant errors (for example: a 409 Conflict error indicating that the name
field is taken) to show to the user without requiring that they submit the entire rule. The form would not be submittable with a duplicate name (and perhaps other error types, too).
Further details
Permissions and Security
Documentation
Availability & Testing
What does success look like, and how can we measure that?
Success for this is zero approval rule submissions that result in an error indicating the name is taken and no complaints about invalid UI errors (like "this form says the name is taken but it's not!").
The overlap of those two data points means we're successfully preventing submissions with data we can know in advance will fail (and thus preventing user frustration with this experience) and we're not incorrectly blocking users from submitting data that is acceptable.