Browse Source

修复

pull/347/head
yystopf 1 year ago
parent
commit
8588c486e3
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      app/controllers/api/pm/issues_controller.rb

+ 4
- 2
app/controllers/api/pm/issues_controller.rb View File

@@ -176,10 +176,10 @@ class Api::Pm::IssuesController < Api::Pm::BaseController
issue.fake_id = row[0]
issue.subject = row[1]
issue.description = row[2]
author = User.find_by(login: row[3]) || User.where(admin: true).first
author = User.find_by(login: row[3])
issue.user = author
issue.created_on = row[4]
changer = User.find_by(login: row[5]) || User.where(admin: true).first
changer = User.find_by(login: row[5])
issue.changer = changer
issue.updated_on = row[6]
issue.status_id = row[7].to_i
@@ -224,6 +224,8 @@ class Api::Pm::IssuesController < Api::Pm::BaseController
next if link_issue.blank? || be_link_issue.blank?
PmLink.create!(linkable_type: 'Issue', linkable_id: link_issue.id, be_linkable_type: 'Issue', be_linkable_id: be_link_issue.id)
end
else
return render_error('导入失败,请上传正确格式的excel文件')
end
end


Loading…
Cancel
Save