|
|
|
@@ -162,19 +162,23 @@ class Api::Pm::IssuesController < Api::Pm::BaseController |
|
|
|
issue.changer = changer |
|
|
|
issue.updated_on = row[5] |
|
|
|
issue.status_id = row[6].to_i |
|
|
|
row[7].split(',').each do |a| |
|
|
|
u = User.find_by(login: a) |
|
|
|
next unless u.present? |
|
|
|
issue.assigners << u |
|
|
|
if row[7].present? |
|
|
|
row[7].split(',').each do |a| |
|
|
|
u = User.find_by(login: a) |
|
|
|
next unless u.present? |
|
|
|
issue.assigners << u |
|
|
|
end |
|
|
|
end |
|
|
|
issue.priority_id = row[8] |
|
|
|
row[9].split(',').each_slice(2).to_a.each do |t| |
|
|
|
tag = IssueTag.find_by(project_id: 0, organization_id: params[:organization_id], name: t[0]) |
|
|
|
if tag.present? |
|
|
|
issue.issue_tags << tag |
|
|
|
else |
|
|
|
tag = IssueTag.create(project_id: 0,organization_id: params[:organization_id], name: t[0], color: t[1]) |
|
|
|
issue.issue_tags << tag |
|
|
|
if row[9].present? |
|
|
|
row[9].split(',').each_slice(2).to_a.each do |t| |
|
|
|
tag = IssueTag.find_by(project_id: 0, organization_id: params[:organization_id], name: t[0]) |
|
|
|
if tag.present? |
|
|
|
issue.issue_tags << tag |
|
|
|
else |
|
|
|
tag = IssueTag.create(project_id: 0,organization_id: params[:organization_id], name: t[0], color: t[1]) |
|
|
|
issue.issue_tags << tag |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
issue.start_date = row[10] |
|
|
|
|