diff --git a/lib/tasks/import_issues_from_chandao.rake b/lib/tasks/import_issues_from_chandao.rake index 472013bda..41bbc3356 100644 --- a/lib/tasks/import_issues_from_chandao.rake +++ b/lib/tasks/import_issues_from_chandao.rake @@ -8,7 +8,7 @@ namespace :import_from_chandao do name = args.name CSV.foreach("#{Rails.root}/#{args.name}", headers: true) do | row | randd_field_hash = row.to_hash - issue = Issue.new + issue = Issue.new(issue_classify: "issue") author = User.like(randd_field_hash['由谁创建']).take issue.author_id = author&.id assigner = randd_field_hash['指派给'].present? ? User.like(randd_field_hash['指派给']).take : nil @@ -46,7 +46,7 @@ namespace :import_from_chandao do pm_project_id = args.pm_project_id CSV.foreach("#{Rails.root}/#{name}", headers: true) do | row | randd_field_hash = row.to_hash - issue = Issue.new + issue = Issue.new(issue_classify: "issue") author = User.like(randd_field_hash['由谁创建']).take issue.author_id = author&.id assigner = randd_field_hash['指派给'].present? ? User.like(randd_field_hash['指派给']).take : nil @@ -81,7 +81,7 @@ namespace :import_from_chandao do pm_project_id = args.pm_project_id CSV.foreach("#{Rails.root}/#{name}", headers: true) do | row | randd_field_hash = row.to_hash - issue = Issue.new + issue = Issue.new(issue_classify: "issue") author = User.like(randd_field_hash['由谁创建']).take issue.author_id = author&.id assigner = randd_field_hash['指派给'].present? ? User.like(randd_field_hash['指派给']).take : nil