|
|
|
@@ -203,12 +203,15 @@ namespace :batch_add_issues do |
|
|
|
UserExtension.create!(user_id: user.id) |
|
|
|
puts "import_user batch success: phone #{phone} email: #{email}" |
|
|
|
end |
|
|
|
issue_tags_value = [] |
|
|
|
if issue['labels'].present? |
|
|
|
issue['labels'].each do |tag| |
|
|
|
project.issue_tags.find_or_create_by!(name: tag['name'], description: tag['description'], color: "##{tag['color']}") |
|
|
|
label = project.issue_tags.find_or_create_by!(name: tag['name'], description: tag['description'], color: "##{tag['color']}") |
|
|
|
issue_tags_value.push(label.id) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
title = issue['title'] |
|
|
|
title = title[0..190] if title.size > 190 |
|
|
|
issue_params = { |
|
|
|
@@ -221,7 +224,7 @@ namespace :batch_add_issues do |
|
|
|
:subject => title, |
|
|
|
:description => issue['body'], |
|
|
|
# :blockchain_token_num, |
|
|
|
:issue_tag_ids => [], |
|
|
|
:issue_tag_ids => issue_tags_value.join(","), |
|
|
|
:assigner_ids => [], |
|
|
|
:attachment_ids => [], |
|
|
|
:receivers_login => [] |
|
|
|
|