Display which approval rules match a given reviewer (FE)
Issue: #233736 (closed)
What does this MR do?
The reviewers
dropdown will now display the approval rules the user is associated with.
- Bold full name
- Grey/Gray user name
- Display approval rules (if applicable)
Testing Case
This feature is behind a feature flag, to turn on:
Feature.enable(:reviewer_approval_rules)
There are 2 areas to set approval rules:
- Project level MR Rules
- Specific MR Rules (overridden rules)
When the merge request is using project-level rules, the reviewers
dropdown will display those of the project defaults. However, if the user has changed or adds rules at the merge request level, the reviewers
dropdown will display those of the specific MR level.
A. Project Approval Rules
Docs: Instructions to add approval rules at project level
Example:
A-1. New MR
In the reviewers
dropdown, you will see the project approval rules
A-2. Edit MR
In the reviewers
dropdown, you will see the project approval rules
A-3. Sidebar
In the reviewers
dropdown, you will see the project approval rules
B. Specific MR Approval Rules
Docs: Instructions to add approval rules at specific MR level
Example:
Make sure you save the change in order for the dropdown to be updated. Of course, this is not the best UX, there's a follow-up issue to ensure the effects will be dynamic on approval rule updates > Issue: #213796 (closed)
B-1. Edit MR
In the reviewers
dropdown, you will see the MR specific approval rules
B-2. Sidebar
In the reviewers
dropdown, you will see the MR specific approval rules
C. Reviewer Dropdown
The reviewer
dropdown will be styled like so:
Non-Truncated | Multiple | Truncated |
---|---|---|
Assigness Dropdown
Note: there will be style changes to assignees
but there will be NO display of approval rules associated with the users.
- Select Assignee(s)
- It will look like this:
Screenshots (strongly suggested)
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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
Related to #233736 (closed)