Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
8a6f58ae
Commit
8a6f58ae
authored
Apr 26, 2021
by
Mario Celi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove not_issuable_queries feature flag
- Remove relevant code - Update specs - Add changelog
parent
7d524985
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
21 additions
and
133 deletions
+21
-133
app/assets/javascripts/filtered_search/dropdown_operator.js
app/assets/javascripts/filtered_search/dropdown_operator.js
+1
-1
app/controllers/concerns/boards_actions.rb
app/controllers/concerns/boards_actions.rb
+0
-3
app/controllers/concerns/issuable_actions.rb
app/controllers/concerns/issuable_actions.rb
+0
-3
app/controllers/concerns/issuable_collections_action.rb
app/controllers/concerns/issuable_collections_action.rb
+0
-4
app/controllers/dashboard_controller.rb
app/controllers/dashboard_controller.rb
+0
-1
app/controllers/groups_controller.rb
app/controllers/groups_controller.rb
+0
-4
app/finders/issuable_finder.rb
app/finders/issuable_finder.rb
+1
-10
app/finders/issuables/author_filter.rb
app/finders/issuables/author_filter.rb
+1
-1
app/finders/issuables/base_filter.rb
app/finders/issuables/base_filter.rb
+1
-6
changelogs/unreleased/292809-remove-not_issuable_queries-ff.yml
...logs/unreleased/292809-remove-not_issuable_queries-ff.yml
+5
-0
config/feature_flags/development/not_issuable_queries.yml
config/feature_flags/development/not_issuable_queries.yml
+0
-8
ee/app/controllers/projects/analytics/code_reviews_controller.rb
...controllers/projects/analytics/code_reviews_controller.rb
+0
-3
ee/app/finders/epics_finder.rb
ee/app/finders/epics_finder.rb
+0
-2
ee/spec/finders/epics_finder_spec.rb
ee/spec/finders/epics_finder_spec.rb
+0
-30
spec/features/boards/boards_spec.rb
spec/features/boards/boards_spec.rb
+12
-37
spec/features/issues/filtered_search/filter_issues_spec.rb
spec/features/issues/filtered_search/filter_issues_spec.rb
+0
-20
No files found.
app/assets/javascripts/filtered_search/dropdown_operator.js
View file @
8a6f58ae
...
...
@@ -50,7 +50,7 @@ export default class DropdownOperator extends FilteredSearchDropdown {
];
const
dropdownToken
=
this
.
tokenKeys
.
searchByKey
(
dropdownName
.
toLowerCase
());
if
(
gon
.
features
?.
notIssuableQueries
&&
!
dropdownToken
?.
hideNotEqual
)
{
if
(
!
dropdownToken
?.
hideNotEqual
)
{
dropdownData
.
push
({
tag
:
'
not-equal
'
,
type
:
'
string
'
,
...
...
app/controllers/concerns/boards_actions.rb
View file @
8a6f58ae
...
...
@@ -10,9 +10,6 @@ module BoardsActions
before_action
:boards
,
only: :index
before_action
:board
,
only: :show
before_action
:push_licensed_features
,
only:
[
:index
,
:show
]
before_action
do
push_frontend_feature_flag
(
:not_issuable_queries
,
parent
,
default_enabled:
true
)
end
end
def
index
...
...
app/controllers/concerns/issuable_actions.rb
View file @
8a6f58ae
...
...
@@ -8,9 +8,6 @@ module IssuableActions
before_action
:authorize_destroy_issuable!
,
only: :destroy
before_action
:check_destroy_confirmation!
,
only: :destroy
before_action
:authorize_admin_issuable!
,
only: :bulk_update
before_action
do
push_frontend_feature_flag
(
:not_issuable_queries
,
@project
,
default_enabled:
true
)
end
end
def
show
...
...
app/controllers/concerns/issuable_collections_action.rb
View file @
8a6f58ae
...
...
@@ -32,10 +32,6 @@ module IssuableCollectionsAction
private
def
set_not_query_feature_flag
(
object
=
nil
)
push_frontend_feature_flag
(
:not_issuable_queries
,
object
,
default_enabled:
true
)
end
def
sorting_field
case
action_name
when
'issues'
...
...
app/controllers/dashboard_controller.rb
View file @
8a6f58ae
...
...
@@ -11,7 +11,6 @@ class DashboardController < Dashboard::ApplicationController
before_action
:projects
,
only:
[
:issues
,
:merge_requests
]
before_action
:set_show_full_reference
,
only:
[
:issues
,
:merge_requests
]
before_action
:check_filters_presence!
,
only:
[
:issues
,
:merge_requests
]
before_action
:set_not_query_feature_flag
respond_to
:html
...
...
app/controllers/groups_controller.rb
View file @
8a6f58ae
...
...
@@ -35,10 +35,6 @@ class GroupsController < Groups::ApplicationController
push_frontend_feature_flag
(
:vue_issuables_list
,
@group
)
end
before_action
do
set_not_query_feature_flag
(
@group
)
end
before_action
:export_rate_limit
,
only:
[
:export
,
:download_export
]
helper_method
:captcha_required?
...
...
app/finders/issuable_finder.rb
View file @
8a6f58ae
...
...
@@ -142,8 +142,6 @@ class IssuableFinder
end
def
should_filter_negated_args?
return
false
unless
not_filters_enabled?
# API endpoints send in `nil` values so we test if there are any non-nil
not_params
.
present?
&&
not_params
.
values
.
any?
end
...
...
@@ -370,8 +368,7 @@ class IssuableFinder
Issuables
::
AuthorFilter
.
new
(
items
,
params:
original_params
,
or_filters_enabled:
or_filters_enabled?
,
not_filters_enabled:
not_filters_enabled?
or_filters_enabled:
or_filters_enabled?
).
filter
end
...
...
@@ -496,12 +493,6 @@ class IssuableFinder
end
end
def
not_filters_enabled?
strong_memoize
(
:not_filters_enabled
)
do
Feature
.
enabled?
(
:not_issuable_queries
,
feature_flag_scope
,
default_enabled: :yaml
)
end
end
def
feature_flag_scope
params
.
group
||
params
.
project
end
...
...
app/finders/issuables/author_filter.rb
View file @
8a6f58ae
...
...
@@ -27,7 +27,7 @@ module Issuables
end
def
by_negated_author
(
issuables
)
return
issuables
unless
not_
filters_enabled?
&&
not_
params
.
present?
return
issuables
unless
not_params
.
present?
if
not_params
[
:author_id
].
present?
issuables
.
not_authored
(
not_params
[
:author_id
])
...
...
app/finders/issuables/base_filter.rb
View file @
8a6f58ae
...
...
@@ -4,11 +4,10 @@ module Issuables
class
BaseFilter
attr_reader
:issuables
,
:params
def
initialize
(
issuables
,
params
:,
or_filters_enabled:
false
,
not_filters_enabled:
false
)
def
initialize
(
issuables
,
params
:,
or_filters_enabled:
false
)
@issuables
=
issuables
@params
=
params
@or_filters_enabled
=
or_filters_enabled
@not_filters_enabled
=
not_filters_enabled
end
def
filter
...
...
@@ -28,9 +27,5 @@ module Issuables
def
or_filters_enabled?
@or_filters_enabled
end
def
not_filters_enabled?
@not_filters_enabled
end
end
end
changelogs/unreleased/292809-remove-not_issuable_queries-ff.yml
0 → 100644
View file @
8a6f58ae
---
title
:
Remove not_issuable_queries feature flag
merge_request
:
60321
author
:
type
:
other
config/feature_flags/development/not_issuable_queries.yml
deleted
100644 → 0
View file @
7d524985
---
name
:
not_issuable_queries
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/27639
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/292809
milestone
:
'
13.0'
type
:
development
group
:
group::project management
default_enabled
:
true
ee/app/controllers/projects/analytics/code_reviews_controller.rb
View file @
8a6f58ae
...
...
@@ -6,9 +6,6 @@ module Projects
include
::
Analytics
::
UniqueVisitsHelper
before_action
:authorize_read_code_review_analytics!
before_action
do
push_frontend_feature_flag
(
:not_issuable_queries
,
@project
,
default_enabled:
true
)
end
track_unique_visits
:index
,
target_id:
'p_analytics_code_reviews'
...
...
ee/app/finders/epics_finder.rb
View file @
8a6f58ae
...
...
@@ -124,8 +124,6 @@ class EpicsFinder < IssuableFinder
end
def
filter_negated_items
(
items
)
return
items
unless
not_filters_enabled?
# API endpoints send in `nil` values so we test if there are any non-nil
return
items
unless
not_params
&
.
values
&
.
any?
...
...
ee/spec/finders/epics_finder_spec.rb
View file @
8a6f58ae
...
...
@@ -638,16 +638,6 @@ RSpec.describe EpicsFinder do
it
'returns all epics without negated label'
do
expect
(
epics
(
params
)).
to
contain_exactly
(
epic1
,
epic2
,
epic3
)
end
context
'when not_issuable_queries is disabled'
do
before
do
stub_feature_flags
(
not_issuable_queries:
false
)
end
it
'returns epics that include negated params'
do
expect
(
epics
(
params
)).
to
contain_exactly
(
negated_epic
,
negated_epic2
,
epic1
,
epic2
,
epic3
)
end
end
end
context
'with negated author'
do
...
...
@@ -662,16 +652,6 @@ RSpec.describe EpicsFinder do
it
'returns all epics without given author'
do
expect
(
epics
(
params
)).
to
contain_exactly
(
epic1
,
epic2
,
epic3
)
end
context
'when not_issuable_queries is disabled'
do
before
do
stub_feature_flags
(
not_issuable_queries:
false
)
end
it
'returns epics that include negated params'
do
expect
(
epics
(
params
)).
to
contain_exactly
(
authored_epic
,
epic1
,
epic2
,
epic3
)
end
end
end
context
'with negated reaction emoji'
do
...
...
@@ -681,16 +661,6 @@ RSpec.describe EpicsFinder do
it
'returns all epics without given emoji name'
do
expect
(
epics
(
params
)).
to
contain_exactly
(
epic1
,
epic2
)
end
context
'when not_issuable_queries is disabled'
do
before
do
stub_feature_flags
(
not_issuable_queries:
false
)
end
it
'returns epics that include negated params'
do
expect
(
epics
(
params
)).
to
contain_exactly
(
epic1
,
epic2
,
epic3
)
end
end
end
end
end
...
...
spec/features/boards/boards_spec.rb
View file @
8a6f58ae
...
...
@@ -119,46 +119,21 @@ RSpec.describe 'Project issue boards', :js do
end
context
'search list negation queries'
do
context
'with the NOT queries feature flag disabled'
do
before
do
stub_feature_flags
(
not_issuable_queries:
false
)
visit_project_board_path_without_query_limit
(
project
,
board
)
end
it
'does not have the != option'
do
find
(
'.filtered-search'
).
set
(
'label:'
)
wait_for_requests
within
(
'#js-dropdown-operator'
)
do
tokens
=
all
(
:css
,
'li.filter-dropdown-item'
)
expect
(
tokens
.
count
).
to
eq
(
1
)
button
=
tokens
[
0
].
find
(
'button'
)
expect
(
button
).
to
have_content
(
'='
)
expect
(
button
).
not_to
have_content
(
'!='
)
end
end
before
do
visit_project_board_path_without_query_limit
(
project
,
board
)
end
context
'with the NOT queries feature flag enabled'
do
before
do
stub_feature_flags
(
not_issuable_queries:
true
)
visit_project_board_path_without_query_limit
(
project
,
board
)
end
it
'does not have the != option'
do
find
(
'.filtered-search'
).
set
(
'label:'
)
it
'does not have the != option'
do
find
(
'.filtered-search'
).
set
(
'label:'
)
wait_for_requests
within
(
'#js-dropdown-operator'
)
do
tokens
=
all
(
:css
,
'li.filter-dropdown-item'
)
expect
(
tokens
.
count
).
to
eq
(
2
)
button
=
tokens
[
0
].
find
(
'button'
)
expect
(
button
).
to
have_content
(
'='
)
button
=
tokens
[
1
].
find
(
'button'
)
expect
(
button
).
to
have_content
(
'!='
)
end
wait_for_requests
within
(
'#js-dropdown-operator'
)
do
tokens
=
all
(
:css
,
'li.filter-dropdown-item'
)
expect
(
tokens
.
count
).
to
eq
(
2
)
button
=
tokens
[
0
].
find
(
'button'
)
expect
(
button
).
to
have_content
(
'='
)
button
=
tokens
[
1
].
find
(
'button'
)
expect
(
button
).
to
have_content
(
'!='
)
end
end
end
...
...
spec/features/issues/filtered_search/filter_issues_spec.rb
View file @
8a6f58ae
...
...
@@ -79,26 +79,6 @@ RSpec.describe 'Filter issues', :js do
expect_filtered_search_input
(
search_term
)
end
context
'with the NOT queries feature flag disabled'
do
before
do
stub_feature_flags
(
not_issuable_queries:
false
)
visit
project_issues_path
(
project
)
end
it
'does not have the != option'
do
input_filtered_search
(
"label:"
,
submit:
false
,
extra_space:
false
)
wait_for_requests
within
(
'#js-dropdown-operator'
)
do
tokens
=
all
(
:css
,
'li.filter-dropdown-item'
)
expect
(
tokens
.
count
).
to
eq
(
1
)
button
=
tokens
[
0
].
find
(
'button'
)
expect
(
button
).
to
have_content
(
'='
)
expect
(
button
).
not_to
have_content
(
'!='
)
end
end
end
describe
'filter issues by author'
do
context
'only author'
do
it
'filters issues by searched author'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment