Skip to content

Add approver filter to Vue merge request list app

Thomas Randolph requested to merge tor/feature/vue-mr-list/filter/approver into master

What does this MR do and why?

For #442915 (closed)

Adds the Approver filter to the Vue-implemented Merge Request list (behind the vue_merge_request_list feature flag).

Approver can only be inclusive (=).

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

Before After Without feature flag
Licensed With the FF enabled, the Approver filter doesn't exist image image
Unlicensed With the FF enabled, the Approver filter doesn't exist image image

How to set up and validate locally

  1. Enable the vue_merge_request_list feature flag in the rails console rails c => Feature.enable( :vue_merge_request_list )
  2. Protect a branch other than master
  3. Add an approval rule for your user and your newly protected branch
  4. Navigate to the Merge Request list e.g. http://gdk.test:3000/[YOUR USERNAME]/[THE PROJECT NAMESPACE]/-/merge_requests
  5. Begin typing approver in the search bar and/or select the Approver filter
  6. Choose your username
  7. Submit the search / filter
    • Try resubmitting the URL in a new tab to recall the same filters in the UI
    • Try clearing the filter bar and submit the (empty) search to see the URL parameters clear

Bonus validation

  1. Remove your approval rule (there should be no approval rules that match your user)
  2. Retry the filter on the Merge Request list page

Bonus bonus validation

  1. Confirm this all matches the behavior of the Approver rule on an unlicensed instance

Note that once you have any approval rule, ALL MRs are returned that you can approve, even those that are not limited by a rule (e.g. any user can approve them).

Edited by Thomas Randolph

Merge request reports

Loading