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
88842608
Commit
88842608
authored
Aug 26, 2020
by
Sarah Yasonik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update other Issues-scoped service references
parent
9a2abecd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
app/controllers/projects/issues_controller.rb
app/controllers/projects/issues_controller.rb
+5
-5
No files found.
app/controllers/projects/issues_controller.rb
View file @
88842608
...
@@ -115,7 +115,7 @@ class Projects::IssuesController < Projects::ApplicationController
...
@@ -115,7 +115,7 @@ class Projects::IssuesController < Projects::ApplicationController
discussion_to_resolve:
params
[
:discussion_to_resolve
]
discussion_to_resolve:
params
[
:discussion_to_resolve
]
)
)
service
=
Issues
::
CreateService
.
new
(
project
,
current_user
,
create_params
)
service
=
::
Issues
::
CreateService
.
new
(
project
,
current_user
,
create_params
)
@issue
=
service
.
execute
@issue
=
service
.
execute
if
service
.
discussions_to_resolve
.
count
(
&
:resolved?
)
>
0
if
service
.
discussions_to_resolve
.
count
(
&
:resolved?
)
>
0
...
@@ -143,7 +143,7 @@ class Projects::IssuesController < Projects::ApplicationController
...
@@ -143,7 +143,7 @@ class Projects::IssuesController < Projects::ApplicationController
new_project
=
Project
.
find
(
params
[
:move_to_project_id
])
new_project
=
Project
.
find
(
params
[
:move_to_project_id
])
return
render_404
unless
issue
.
can_move?
(
current_user
,
new_project
)
return
render_404
unless
issue
.
can_move?
(
current_user
,
new_project
)
@issue
=
Issues
::
UpdateService
.
new
(
project
,
current_user
,
target_project:
new_project
).
execute
(
issue
)
@issue
=
::
Issues
::
UpdateService
.
new
(
project
,
current_user
,
target_project:
new_project
).
execute
(
issue
)
end
end
respond_to
do
|
format
|
respond_to
do
|
format
|
...
@@ -157,7 +157,7 @@ class Projects::IssuesController < Projects::ApplicationController
...
@@ -157,7 +157,7 @@ class Projects::IssuesController < Projects::ApplicationController
end
end
def
reorder
def
reorder
service
=
Issues
::
ReorderService
.
new
(
project
,
current_user
,
reorder_params
)
service
=
::
Issues
::
ReorderService
.
new
(
project
,
current_user
,
reorder_params
)
if
service
.
execute
(
issue
)
if
service
.
execute
(
issue
)
head
:ok
head
:ok
...
@@ -167,7 +167,7 @@ class Projects::IssuesController < Projects::ApplicationController
...
@@ -167,7 +167,7 @@ class Projects::IssuesController < Projects::ApplicationController
end
end
def
related_branches
def
related_branches
@related_branches
=
Issues
::
RelatedBranchesService
@related_branches
=
::
Issues
::
RelatedBranchesService
.
new
(
project
,
current_user
)
.
new
(
project
,
current_user
)
.
execute
(
issue
)
.
execute
(
issue
)
.
map
{
|
branch
|
branch
.
merge
(
link:
branch_link
(
branch
))
}
.
map
{
|
branch
|
branch
.
merge
(
link:
branch_link
(
branch
))
}
...
@@ -319,7 +319,7 @@ class Projects::IssuesController < Projects::ApplicationController
...
@@ -319,7 +319,7 @@ class Projects::IssuesController < Projects::ApplicationController
def
update_service
def
update_service
update_params
=
issue_params
.
merge
(
spammable_params
)
update_params
=
issue_params
.
merge
(
spammable_params
)
Issues
::
UpdateService
.
new
(
project
,
current_user
,
update_params
)
::
Issues
::
UpdateService
.
new
(
project
,
current_user
,
update_params
)
end
end
def
finder_type
def
finder_type
...
...
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