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-07 03:09:33 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-07 03:09:33 +0300
commitb56027c9d80ac0e297ba8a43c81e8504172dbf9f (patch)
treeb85f743277145e930ae195664655d696e6e0a7fc /app/controllers/projects/import
parent7915c41e4261719719e791602c8235574157164c (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/projects/import')
-rw-r--r--app/controllers/projects/import/jira_controller.rb10
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