Show `!=` NOT filter for target branch in the Vue MR List
What does this MR do and why?
When I was working on porting the Target Branch
filter option to the new Vue MR list page, I didn't initially realize I needed to raise the issue that the implementation didn't support the !=
filter.
This adds the !=
filter option for the MR target branch filter.
References
- Initial issue to add the Vue filter: #442923 (closed)
- Implementation: !150757 (merged)
- Adding support for
!=
to the BE: !170664 (merged)
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 | |
---|---|---|
Filter Bar | ![]() |
![]() |
Actual != filtering |
You can't use != Target Branch filtering with the feature flag enabled.Here's the list page with an MR that has a non- master target branch.![]() |
![]() |
How to set up and validate locally
- Enable the
vue_merge_request_list
feature flag in the rails consolerails c
=>Feature.enable( :vue_merge_request_list )
- Make sure that you have at least 1 MR (it would probably be helpful to have an MR that targets a branch other than
master
, although this isn't required) - Navigate to the Merge Request list e.g.
http://gdk.test:3443/[YOUR USERNAME]/[THE PROJECT NAMESPACE]/-/merge_requests
- Begin typing
target branch
in the search bar, and select theTarget Branch
filter - Select the
!=
(NOT) exclusion - Select one of your target branches that would exclude at least one MR
- Submit the search / filter
- Try refreshing the page completely to test the URL search parameter on initial load
- Try clearing the target branch token filter and submitting that to see all the MRs become visible
Edited by Thomas Randolph