diff options
author | Sean McGivern <sean@gitlab.com> | 2018-10-05 11:46:54 +0100 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2018-10-05 11:46:54 +0100 |
commit | 456ed01d3ee84007baaa6274731e137607f50830 (patch) | |
tree | d1705d6320468cb2cb72e6e864d9d5594502680c | |
parent | 309ee7c73c4f77661a16ab332e53e33d05745682 (diff) | |
download | gitlab-ce-50246-can-t-sort-group-issues-by-popularity-when-searching.tar.gz |
Put issues group search CTE behind a (default on) flag50246-can-t-sort-group-issues-by-popularity-when-searching
We don't think this is needed any more - see
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/21521, and
https://gitlab.com/gitlab-org/gitlab-ce/issues/52271 for removing the flag.
-rw-r--r-- | app/finders/issuable_finder.rb | 1 | ||||
-rw-r--r-- | spec/controllers/groups_controller_spec.rb | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/app/finders/issuable_finder.rb b/app/finders/issuable_finder.rb index 17e9b59b355..1f98ecf95ca 100644 --- a/app/finders/issuable_finder.rb +++ b/app/finders/issuable_finder.rb @@ -363,6 +363,7 @@ class IssuableFinder def use_cte_for_search? return false unless search return false unless Gitlab::Database.postgresql? + return false unless Feature.enabled?(:use_cte_for_group_issues_search, default_enabled: true) params[:use_cte_for_search] end diff --git a/spec/controllers/groups_controller_spec.rb b/spec/controllers/groups_controller_spec.rb index ff27e057b31..a099cdafa58 100644 --- a/spec/controllers/groups_controller_spec.rb +++ b/spec/controllers/groups_controller_spec.rb @@ -226,6 +226,11 @@ describe GroupsController do end context 'searching' do + # Remove as part of https://gitlab.com/gitlab-org/gitlab-ce/issues/52271 + before do + stub_feature_flags(use_cte_for_group_issues_search: false) + end + it 'works with popularity sort' do get :issues, id: group.to_param, search: 'foo', sort: 'popularity' |