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
85e058fd
Commit
85e058fd
authored
Nov 30, 2021
by
Francisco Javier López
Committed by
Alper Akgun
Nov 30, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use linear version GroupsWithTemplatesFinder#extended_group_search
parent
0f685998
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
5 deletions
+34
-5
config/feature_flags/development/linear_groups_template_finder_extended_group_search_ancestors_scopes.yml
...emplate_finder_extended_group_search_ancestors_scopes.yml
+8
-0
ee/app/finders/groups_with_templates_finder.rb
ee/app/finders/groups_with_templates_finder.rb
+9
-5
ee/spec/finders/groups_with_templates_finder_spec.rb
ee/spec/finders/groups_with_templates_finder_spec.rb
+17
-0
No files found.
config/feature_flags/development/linear_groups_template_finder_extended_group_search_ancestors_scopes.yml
0 → 100644
View file @
85e058fd
---
name
:
linear_groups_template_finder_extended_group_search_ancestors_scopes
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/74599
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/345786
milestone
:
'
14.6'
type
:
development
group
:
group::access
default_enabled
:
false
ee/app/finders/groups_with_templates_finder.rb
View file @
85e058fd
...
...
@@ -18,11 +18,15 @@ class GroupsWithTemplatesFinder
attr_reader
:group_id
def
extended_group_search
groups
=
Group
.
with_project_templates
groups_with_plan
=
Gitlab
::
ObjectHierarchy
.
new
(
groups
)
.
base_and_ancestors
.
with_feature_available_in_plan
(
:group_project_templates
)
groups
=
if
Feature
.
enabled?
(
:linear_groups_template_finder_extended_group_search_ancestors_scopes
,
current_group
,
default_enabled: :yaml
)
Group
.
with_project_templates
.
self_and_ancestors
else
Gitlab
::
ObjectHierarchy
.
new
(
Group
.
with_project_templates
)
.
base_and_ancestors
end
groups_with_plan
=
groups
.
with_feature_available_in_plan
(
:group_project_templates
)
# We're adding an extra query that will be removed once we remove the feature flag in https://gitlab.com/gitlab-org/gitlab/-/issues/339439
if
::
Feature
.
enabled?
(
:linear_groups_template_finder_extended_group_search
,
current_group
,
default_enabled: :yaml
)
...
...
ee/spec/finders/groups_with_templates_finder_spec.rb
View file @
85e058fd
...
...
@@ -106,4 +106,21 @@ RSpec.describe GroupsWithTemplatesFinder, :saas do
it_behaves_like
'group template finder examples'
end
context
'when feature flag :linear_groups_template_finder_extended_group_search_ancestors_scopes is disabled'
do
before
do
stub_feature_flags
(
linear_groups_template_finder_extended_group_search_ancestors_scopes:
false
)
end
it_behaves_like
'group template finder examples'
end
context
'when all linear feature flags are disabled'
do
before
do
stub_feature_flags
(
linear_groups_template_finder_extended_group_search:
false
)
stub_feature_flags
(
linear_groups_template_finder_extended_group_search_ancestors_scopes:
false
)
end
it_behaves_like
'group template finder examples'
end
end
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