Add form validation when required approvers exceeds number of users allowed to approve

Blocked by Support multiple approval rules in project-leve... (&9042)

Release notes

Problem to solve

For Deployment approvals, we need a validation that will alert the user that the number of users in a role should match the number of required approvals, otherwise they might get into a configuration where there are not enough approvers available.

Intended users

  • Rachel (Release Manager)
  • Priyanka (Platform Engineer)

Metrics

Measuring the usage of this setting through front-end event tracking would be a good way to understand advanced usage of deployment approvals.

User experience goal

Proposal

The behavior is:

  1. When one (or more) roles are chosen as approver and more than 0 required approvals are chosen, this warning alert will appear.
  2. If the role is removed from the selection, the warning should disappear automatically.
  3. If the number of approvals is changed to 0, the warning should disappear automatically.

Out of scope

Further details

  • Default value for a protected environment in a project is 0 (no approvals requires)

Technical detail

Permissions and Security

Documentation

Yes, documentation and screenshot.

Availability & Testing

Available Tier

GitLab Premium

What does success look like, and how can we measure that?

Customers are prevented from accidentally selecting an invalid number of required approvals

What is the type of buyer?

Inherited from epic:

  • Alex - the Application Development Manager
  • Casey - the Release and Change Management Director
  • Skyler - the Chief Information Security Officer

Is this a cross-stage feature?

Links / references

#344675 (closed)

Proposal:

  • Provide users with an error message to help them understand how to fix the problem.

Design

  • Add in error "Environment cannot be protected because the number of approvals required is greater than the members in {Group/Role}. Either decrease the number of approvals required, or select a different group or role."
  • Highlight the field with the incorrect number of approvers.
  • Chosen users will always be locked at 1 approval.
Proposed Error
Screen_Shot_2022-09-01_at_10.29.12_AM

Figma File

This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.

Edited Jan 24, 2023 by Rayana Verissimo
Assignee Loading
Time tracking Loading