|
|
|
@@ -12,7 +12,9 @@ namespace :import_from_chandao do |
|
|
|
author = User.like(randd_field_hash['由谁创建']).take |
|
|
|
issue.author_id = author&.id |
|
|
|
assigner = User.like(randd_field_hash['指派给']).take |
|
|
|
issue.assigners << assigner |
|
|
|
if assigner.present? |
|
|
|
issue.assigners << assigner |
|
|
|
end |
|
|
|
issue.status_id = IssueStatus.first.id |
|
|
|
issue.tracker_id = Tracker.first.id |
|
|
|
issue.priority_id = randd_field_hash['优先级'].to_i |
|
|
|
@@ -37,7 +39,9 @@ namespace :import_from_chandao do |
|
|
|
author = User.like(randd_field_hash['由谁创建']).take |
|
|
|
issue.author_id = author&.id |
|
|
|
assigner = User.like(randd_field_hash['指派给']).take |
|
|
|
issue.assigners << assigner |
|
|
|
if assigner.present? |
|
|
|
issue.assigners << assigner |
|
|
|
end |
|
|
|
issue.status_id = IssueStatus.first.id |
|
|
|
issue.tracker_id = Tracker.first.id |
|
|
|
issue.priority_id = randd_field_hash['优先级'].to_i |
|
|
|
|