Commit 51c9fdbf authored by Mark Chao's avatar Mark Chao

Merge branch 'sy-fix-service-path' into 'master'

Ensure Issues::BuildService is findable on reload from issues controller

See merge request gitlab-org/gitlab!40535
parents 26f322d1 88842608
......@@ -95,7 +95,7 @@ class Projects::IssuesController < Projects::ApplicationController
discussion_to_resolve: params[:discussion_to_resolve],
confidential: !!Gitlab::Utils.to_boolean(params[:issue][:confidential])
)
service = Issues::BuildService.new(project, current_user, build_params)
service = ::Issues::BuildService.new(project, current_user, build_params)
@issue = @noteable = service.execute
......@@ -115,7 +115,7 @@ class Projects::IssuesController < Projects::ApplicationController
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
if service.discussions_to_resolve.count(&:resolved?) > 0
......@@ -143,7 +143,7 @@ class Projects::IssuesController < Projects::ApplicationController
new_project = Project.find(params[:move_to_project_id])
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
respond_to do |format|
......@@ -157,7 +157,7 @@ class Projects::IssuesController < Projects::ApplicationController
end
def reorder
service = Issues::ReorderService.new(project, current_user, reorder_params)
service = ::Issues::ReorderService.new(project, current_user, reorder_params)
if service.execute(issue)
head :ok
......@@ -167,7 +167,7 @@ class Projects::IssuesController < Projects::ApplicationController
end
def related_branches
@related_branches = Issues::RelatedBranchesService
@related_branches = ::Issues::RelatedBranchesService
.new(project, current_user)
.execute(issue)
.map { |branch| branch.merge(link: branch_link(branch)) }
......@@ -319,7 +319,7 @@ class Projects::IssuesController < Projects::ApplicationController
def update_service
update_params = issue_params.merge(spammable_params)
Issues::UpdateService.new(project, current_user, update_params)
::Issues::UpdateService.new(project, current_user, update_params)
end
def finder_type
......
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