Browse Source

更改:禅道脚本中数据为空处理

pull/347/head
yystopf 2 years ago
parent
commit
7f6c6383bc
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      lib/tasks/import_issues_from_chandao.rake

+ 6
- 2
lib/tasks/import_issues_from_chandao.rake View File

@@ -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


Loading…
Cancel
Save