diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-07 03:09:33 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-07 03:09:33 +0300 |
commit | b56027c9d80ac0e297ba8a43c81e8504172dbf9f (patch) | |
tree | b85f743277145e930ae195664655d696e6e0a7fc /app/controllers/projects | |
parent | 7915c41e4261719719e791602c8235574157164c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/projects')
-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 |