Commit 8623992f authored by Alexandru Croitor's avatar Alexandru Croitor

Ensure correct Issues module is being used

I've added a /lib/gitlab/issues/ module so now any usages of
Issues::Smth wihthin /lib/gitlab/issues/* will look for Smth
within /lib/gitlab/issues folder, so we need to change those
usages to resolve to the external definitions outside of
/lib/gitlab/
parent 8834fda8
......@@ -55,7 +55,7 @@ module Gitlab
private
def create_issue
Issues::CreateService.new(
::Issues::CreateService.new(
project: project,
current_user: author,
params: {
......
......@@ -71,7 +71,7 @@ module Gitlab
end
def create_issue!
@issue = Issues::CreateService.new(
@issue = ::Issues::CreateService.new(
project: project,
current_user: User.support_bot,
params: {
......
......@@ -267,7 +267,7 @@ module Gitlab
private
def zoom_link_service
Issues::ZoomLinkService.new(project: quick_action_target.project, current_user: current_user, params: { issue: quick_action_target })
::Issues::ZoomLinkService.new(project: quick_action_target.project, current_user: current_user, params: { issue: quick_action_target })
end
end
end
......
......@@ -29,7 +29,7 @@ module Gitlab
private
def close_issue(issue:)
Issues::CloseService.new(project: project, current_user: current_user).execute(issue)
::Issues::CloseService.new(project: project, current_user: current_user).execute(issue)
end
def presenter(issue)
......
......@@ -29,11 +29,11 @@ module Gitlab
return Gitlab::SlashCommands::Presenters::Access.new.not_found
end
new_issue = Issues::MoveService.new(project: project, current_user: current_user)
new_issue = ::Issues::MoveService.new(project: project, current_user: current_user)
.execute(old_issue, target_project)
presenter(new_issue).present(old_issue)
rescue Issues::MoveService::MoveError => e
rescue ::Issues::MoveService::MoveError => e
presenter(old_issue).display_move_error(e.message)
end
......
......@@ -33,7 +33,7 @@ module Gitlab
private
def create_issue(title:, description:)
Issues::CreateService.new(project: project, current_user: current_user, params: { title: title, description: description }, spam_params: nil).execute
::Issues::CreateService.new(project: project, current_user: current_user, params: { title: title, description: description }, spam_params: nil).execute
end
def presenter(issue)
......
......@@ -918,7 +918,7 @@ module Gitlab
jira: count(::JiraImportState.where(time_period)), # rubocop: disable CodeReuse/ActiveRecord
fogbugz: projects_imported_count('fogbugz', time_period),
phabricator: projects_imported_count('phabricator', time_period),
csv: count(Issues::CsvImport.where(time_period)) # rubocop: disable CodeReuse/ActiveRecord
csv: count(::Issues::CsvImport.where(time_period)) # rubocop: disable CodeReuse/ActiveRecord
}
end
......@@ -934,7 +934,7 @@ module Gitlab
project_imports = distinct_count(::Project.where(time_period).where.not(import_type: nil), :creator_id)
bulk_imports = distinct_count(::BulkImport.where(time_period), :user_id)
jira_issue_imports = distinct_count(::JiraImportState.where(time_period), :user_id)
csv_issue_imports = distinct_count(Issues::CsvImport.where(time_period), :user_id)
csv_issue_imports = distinct_count(::Issues::CsvImport.where(time_period), :user_id)
group_imports = distinct_count(::GroupImportState.where(time_period), :user_id)
add(project_imports, bulk_imports, jira_issue_imports, csv_issue_imports, group_imports)
......
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