diff options
Diffstat (limited to 'app/controllers/projects/import/jira_controller.rb')
-rw-r--r-- | app/controllers/projects/import/jira_controller.rb | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/app/controllers/projects/import/jira_controller.rb b/app/controllers/projects/import/jira_controller.rb index 26d9b4b223f..4a70ed45404 100644 --- a/app/controllers/projects/import/jira_controller.rb +++ b/app/controllers/projects/import/jira_controller.rb @@ -11,11 +11,10 @@ module Projects before_action :authorize_admin_project!, only: [:import] def show - @is_jira_configured = @project.jira_service.present? - return if Feature.enabled?(:jira_issue_import_vue, @project) + jira_service = @project.jira_service - if !@project.latest_jira_import&.in_progress? && current_user&.can?(:admin_project, @project) - jira_client = @project.jira_service.client + if jira_service.present? && !@project.latest_jira_import&.in_progress? && current_user&.can?(:admin_project, @project) + jira_client = jira_service.client jira_projects = jira_client.Project.all if jira_projects.present? @@ -25,7 +24,9 @@ module Projects end end - flash[:notice] = _("Import %{status}") % { status: @project.jira_import_status } unless @project.latest_jira_import&.initial? + unless Feature.enabled?(:jira_issue_import_vue, @project, default_enabled: true) + flash[:notice] = _("Import %{status}") % { status: @project.jira_import_status } unless @project.latest_jira_import&.initial? + end end def import @@ -50,7 +51,7 @@ module Projects end def jira_integration_configured? - return if Feature.enabled?(:jira_issue_import_vue, @project) + return if Feature.enabled?(:jira_issue_import_vue, @project, default_enabled: true) return if @project.jira_service flash[:notice] = _("Configure the Jira integration first on your project's %{strong_start} Settings > Integrations > Jira%{strong_end} page." % |