Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-04 00:09:56 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-04 00:09:56 +0300
commitc1a50b8195f4e36fda9b233acbde57a449bcf6c3 (patch)
treeb24a10a7951e9a799397753d1badf6894fe03089 /app/controllers/projects
parentb6847c621ff246e6abceb90545d5a608318762d6 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/projects')
-rw-r--r--app/controllers/projects/import/jira_controller.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/controllers/projects/import/jira_controller.rb b/app/controllers/projects/import/jira_controller.rb
index e88d28e9db4..03ae17e18be 100644
--- a/app/controllers/projects/import/jira_controller.rb
+++ b/app/controllers/projects/import/jira_controller.rb
@@ -9,7 +9,13 @@ module Projects
def show
unless @project.import_state&.in_progress?
jira_client = @project.jira_service.client
- @jira_projects = jira_client.Project.all.map { |p| ["#{p.name} (#{p.key})", p.key] }
+ jira_projects = jira_client.Project.all
+
+ if jira_projects.present?
+ @jira_projects = jira_projects.map { |p| ["#{p.name} (#{p.key})", p.key] }
+ else
+ flash[:alert] = 'No projects have been returned from Jira. Please check your Jira configuration.'
+ end
end
flash[:notice] = _("Import %{status}") % { status: @project.import_state.status } if @project.import_state.present? && !@project.import_state.none?