diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-03 21:09:56 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-03 21:09:56 +0000 |
commit | c1a50b8195f4e36fda9b233acbde57a449bcf6c3 (patch) | |
tree | b24a10a7951e9a799397753d1badf6894fe03089 /app/controllers | |
parent | b6847c621ff246e6abceb90545d5a608318762d6 (diff) | |
download | gitlab-ce-c1a50b8195f4e36fda9b233acbde57a449bcf6c3.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects/import/jira_controller.rb | 8 |
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? |