Class: JiraImport::StartImportService

Inherits:
Object
  • Object
show all
Defined in:
app/services/jira_import/start_import_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user, project, jira_project_key, users_mapping) ⇒ StartImportService

Returns a new instance of StartImportService.



7
8
9
10
11
12
# File 'app/services/jira_import/start_import_service.rb', line 7

def initialize(user, project, jira_project_key, users_mapping)
  @user = user
  @project = project
  @jira_project_key = jira_project_key
  @users_mapping = users_mapping
end

Instance Attribute Details

#jira_project_keyObject (readonly)

Returns the value of attribute jira_project_key.



5
6
7
# File 'app/services/jira_import/start_import_service.rb', line 5

def jira_project_key
  @jira_project_key
end

#projectObject (readonly)

Returns the value of attribute project.



5
6
7
# File 'app/services/jira_import/start_import_service.rb', line 5

def project
  @project
end

#userObject (readonly)

Returns the value of attribute user.



5
6
7
# File 'app/services/jira_import/start_import_service.rb', line 5

def user
  @user
end

#users_mappingObject (readonly)

Returns the value of attribute users_mapping.



5
6
7
# File 'app/services/jira_import/start_import_service.rb', line 5

def users_mapping
  @users_mapping
end

Instance Method Details

#executeObject



14
15
16
17
18
19
20
# File 'app/services/jira_import/start_import_service.rb', line 14

def execute
  validation_response = validate
  return validation_response if validation_response&.error?

  store_users_mapping
  create_and_schedule_import
end