mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
修复:更新禅道数据脚本
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user