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
c34fdda5
Commit
c34fdda5
authored
Nov 07, 2017
by
Jarka Kadlecova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify specifying finder, move ee specific code outside concern
parent
8c3277d6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
12 deletions
+18
-12
app/controllers/concerns/issuable_collections.rb
app/controllers/concerns/issuable_collections.rb
+1
-6
app/controllers/projects/issues_controller.rb
app/controllers/projects/issues_controller.rb
+3
-2
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+3
-2
ee/app/controllers/groups/epics_controller.rb
ee/app/controllers/groups/epics_controller.rb
+11
-2
No files found.
app/controllers/concerns/issuable_collections.rb
View file @
c34fdda5
...
...
@@ -131,9 +131,8 @@ module IssuableCollections
end
def
finder
return
@finder
if
@finder
return
@finder
if
defined?
(
@finder
)
@finder_type
||=
finder_type
@finder
=
issuable_finder_for
(
@finder_type
)
end
...
...
@@ -143,8 +142,6 @@ module IssuableCollections
'Issue'
when
MergeRequestsFinder
'MergeRequest'
when
EpicsFinder
'Epic'
end
end
...
...
@@ -157,8 +154,6 @@ module IssuableCollections
:source_project
,
:target_project
,
:author
,
:assignee
,
:labels
,
:milestone
,
head_pipeline: :project
,
target_project: :namespace
,
merge_request_diff: :merge_request_diff_commits
]
when
'Epic'
[
:group
,
:author
]
end
end
end
app/controllers/projects/issues_controller.rb
View file @
c34fdda5
...
...
@@ -248,7 +248,8 @@ class Projects::IssuesController < Projects::ApplicationController
Issues
::
UpdateService
.
new
(
project
,
current_user
,
update_params
)
end
def
finder_type
IssuesFinder
def
set_issuables_index
@finder_type
=
IssuesFinder
super
end
end
app/controllers/projects/merge_requests_controller.rb
View file @
c34fdda5
...
...
@@ -329,7 +329,8 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
@target_branches
=
@merge_request
.
target_project
.
repository
.
branch_names
end
def
finder_type
MergeRequestsFinder
def
set_issuables_index
@finder_type
=
MergeRequestsFinder
super
end
end
ee/app/controllers/groups/epics_controller.rb
View file @
c34fdda5
...
...
@@ -53,7 +53,16 @@ class Groups::EpicsController < Groups::ApplicationController
Epics
::
UpdateService
.
new
(
nil
,
current_user
,
epic_params
)
end
def
finder_type
EpicsFinder
def
set_issuables_index
@finder_type
=
EpicsFinder
super
end
def
collection_type
@collection_type
||=
'Epic'
end
def
preload_for_collection
@preload_for_collection
||=
[
:group
,
:author
]
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