修复:脚本中status找不到的情况
This commit is contained in:
parent
a247ac0d3a
commit
13e58392dc
|
@ -37,7 +37,7 @@ namespace :import_from_chandao do
|
||||||
"未开始" => 1,
|
"未开始" => 1,
|
||||||
"进行中" => 2,
|
"进行中" => 2,
|
||||||
"已完成" => 3,
|
"已完成" => 3,
|
||||||
"已关闭" => 4
|
"已关闭" => 5
|
||||||
}
|
}
|
||||||
h[str]
|
h[str]
|
||||||
end
|
end
|
||||||
|
@ -53,7 +53,7 @@ namespace :import_from_chandao do
|
||||||
if assigner.present?
|
if assigner.present?
|
||||||
issue.assigners << assigner
|
issue.assigners << assigner
|
||||||
end
|
end
|
||||||
issue.status_id = trans_status(randd_field_hash['任务状态'])
|
issue.status_id = trans_status(randd_field_hash['任务状态']) || IssueStatus.first.id
|
||||||
issue.tracker_id = Tracker.first.id
|
issue.tracker_id = Tracker.first.id
|
||||||
issue.priority_id = randd_field_hash['优先级'].to_i
|
issue.priority_id = randd_field_hash['优先级'].to_i
|
||||||
issue.subject = randd_field_hash['任务名称']
|
issue.subject = randd_field_hash['任务名称']
|
||||||
|
|
Loading…
Reference in New Issue