diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-20 21:38:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-20 21:38:24 +0300 |
commit | 983a0bba5d2a042c4a3bbb22432ec192c7501d82 (patch) | |
tree | b153cd387c14ba23bd5a07514c7c01fddf6a78a0 /app/controllers/projects/import/jira_controller.rb | |
parent | a2bddee2cdb38673df0e004d5b32d9f77797de64 (diff) |
Add latest changes from gitlab-org/gitlab@12-10-stable-ee
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." % |