summaryrefslogtreecommitdiff
path: root/lib/gitlab/github_import/importer/issue_importer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/github_import/importer/issue_importer.rb')
-rw-r--r--lib/gitlab/github_import/importer/issue_importer.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/gitlab/github_import/importer/issue_importer.rb b/lib/gitlab/github_import/importer/issue_importer.rb
index d964bae3dd2..b477468d327 100644
--- a/lib/gitlab/github_import/importer/issue_importer.rb
+++ b/lib/gitlab/github_import/importer/issue_importer.rb
@@ -60,6 +60,9 @@ module Gitlab
work_item_type_id: issue.work_item_type_id
}
+ issue = project.issues.new(attributes.merge(importing: true))
+ issue.validate!
+
insert_and_return_id(attributes, project.issues)
rescue ActiveRecord::InvalidForeignKey
# It's possible the project has been deleted since scheduling this