diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-07 00:09:33 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-07 00:09:33 +0000 |
commit | b56027c9d80ac0e297ba8a43c81e8504172dbf9f (patch) | |
tree | b85f743277145e930ae195664655d696e6e0a7fc /app/controllers/projects/import | |
parent | 7915c41e4261719719e791602c8235574157164c (diff) | |
download | gitlab-ce-b56027c9d80ac0e297ba8a43c81e8504172dbf9f.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/projects/import')
-rw-r--r-- | app/controllers/projects/import/jira_controller.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/app/controllers/projects/import/jira_controller.rb b/app/controllers/projects/import/jira_controller.rb index 03ae17e18be..6af630a9528 100644 --- a/app/controllers/projects/import/jira_controller.rb +++ b/app/controllers/projects/import/jira_controller.rb @@ -22,8 +22,14 @@ module Projects end def import - response = ::JiraImport::StartImportService.new(current_user, @project, jira_import_params[:jira_project_key]).execute - flash[:notice] = response.message if response.message.present? + jira_project_key = jira_import_params[:jira_project_key] + + if jira_project_key.present? + response = ::JiraImport::StartImportService.new(current_user, @project, jira_project_key).execute + flash[:notice] = response.message if response.message.present? + else + flash[:alert] = 'No jira project key has been provided.' + end redirect_to project_import_jira_path(@project) end |