mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 20:00:49 +08:00
更改:禅道导入数据脚本
This commit is contained in:
@@ -9,7 +9,7 @@ namespace :import_from_chandao do
|
||||
CSV.foreach("#{Rails.root}/#{args.name}", headers: true) do | row |
|
||||
randd_field_hash = row.to_hash
|
||||
issue = Issue.new(issue_classify: "issue")
|
||||
author = User.like(randd_field_hash['由谁创建']).take
|
||||
author = User.like(randd_field_hash['由谁创建']).take || User.where(admin: first).first
|
||||
issue.author_id = author&.id
|
||||
assigner = randd_field_hash['指派给'].present? ? User.like(randd_field_hash['指派给']).take : nil
|
||||
if assigner.present?
|
||||
|
||||
Reference in New Issue
Block a user