Commit 73af9bed authored by Dylan Griffith's avatar Dylan Griffith

Merge branch '250317-basic-epics-search-rollout' into 'master'

Rollout of basic search for epics

See merge request gitlab-org/gitlab!44269
parents 95e43598 d9b20dbf
---
name: epics_search
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/42456
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/250317
group: group::global search
type: development
default_enabled: false
\ No newline at end of file
......@@ -223,6 +223,7 @@ backed by the database and allows searching in:
- Merge requests
- Milestones
- Users
- Epics (Group only)
- Code (Project only)
- Comments (Project only)
- Commits (Project only)
......
......@@ -36,7 +36,7 @@ module EE
override :allowed_scopes
def allowed_scopes
return super unless ::Feature.enabled?(:epics_search) && group.feature_available?(:epics)
return super unless group.feature_available?(:epics)
strong_memoize(:ee_group_allowed_scopes) do
super + %w(epics)
......
---
title: Add basic search for epics
merge_request: 44269
author:
type: added
......@@ -15,7 +15,6 @@ RSpec.describe 'User searches for epics', :js do
end
before do
stub_feature_flags(epics_search: true)
stub_licensed_features(epics: true)
group.add_maintainer(user)
......
......@@ -235,27 +235,25 @@ RSpec.describe Search::GroupService, :elastic do
describe '#allowed_scopes' do
context 'epics scope' do
where(:feature_enabled, :epics_available, :epics_allowed) do
false | false | false
true | false | false
false | true | false
true | true | true
let(:allowed_scopes) { described_class.new(user, group, {}).allowed_scopes }
before do
stub_licensed_features(epics: epics_available)
end
with_them do
let(:allowed_scopes) { described_class.new(user, group, {}).allowed_scopes }
context 'epics available' do
let(:epics_available) { true }
before do
stub_feature_flags(epics_search: feature_enabled)
stub_licensed_features(epics: epics_available)
it 'does include epics to allowed_scopes' do
expect(allowed_scopes).to include('epics')
end
end
it 'sets correct allowed_scopes' do
if epics_allowed
expect(allowed_scopes).to include('epics')
else
expect(allowed_scopes).not_to include('epics')
end
context 'epics is no available' do
let(:epics_available) { false }
it 'does not include epics to allowed_scopes' do
expect(allowed_scopes).not_to include('epics')
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment