diff options
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 15b8d5db214..1f968cdfad1 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -859,9 +859,7 @@ class Project < ApplicationRecord end def jira_import_status - return import_status if jira_force_import? - - import_data&.becomes(JiraImportData)&.projects.blank? ? 'none' : 'finished' + latest_jira_import&.status || 'initial' end def human_import_status_name @@ -875,8 +873,6 @@ class Project < ApplicationRecord elsif gitlab_project_import? # Do not retry on Import/Export until https://gitlab.com/gitlab-org/gitlab-foss/issues/26189 is solved. RepositoryImportWorker.set(retry: false).perform_async(self.id) - elsif jira_import? - Gitlab::JiraImport::Stage::StartImportWorker.perform_async(self.id) else RepositoryImportWorker.perform_async(self.id) end @@ -909,7 +905,7 @@ class Project < ApplicationRecord # This method is overridden in EE::Project model def remove_import_data - import_data&.destroy unless jira_import? + import_data&.destroy end def ci_config_path=(value) @@ -972,11 +968,7 @@ class Project < ApplicationRecord end def jira_import? - import_type == 'jira' && Feature.enabled?(:jira_issue_import, self) - end - - def jira_force_import? - jira_import? && import_data&.becomes(JiraImportData)&.force_import? + import_type == 'jira' && latest_jira_import.present? && Feature.enabled?(:jira_issue_import, self) end def gitlab_project_import? |