Skip to content
Snippets Groups Projects
Commit 8623992f authored by Alexandru Croitor's avatar Alexandru Croitor
Browse files

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
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -55,7 +55,7 @@ def metrics_event
private
 
def create_issue
Issues::CreateService.new(
::Issues::CreateService.new(
project: project,
current_user: author,
params: {
Loading
Loading
Loading
Loading
@@ -71,7 +71,7 @@ def valid_project_key?(project, slug)
end
 
def create_issue!
@issue = Issues::CreateService.new(
@issue = ::Issues::CreateService.new(
project: project,
current_user: User.support_bot,
params: {
Loading
Loading
Loading
Loading
@@ -267,7 +267,7 @@ module IssueActions
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
Loading
Loading
Loading
Loading
@@ -29,7 +29,7 @@ def execute(match)
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)
Loading
Loading
Loading
Loading
@@ -29,11 +29,11 @@ def execute(match)
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
 
Loading
Loading
Loading
Loading
@@ -33,7 +33,7 @@ def execute(match)
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)
Loading
Loading
Loading
Loading
@@ -918,7 +918,7 @@ def issue_imports(time_period)
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
 
Loading
Loading
@@ -934,7 +934,7 @@ def unique_users_all_imports(time_period)
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)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment