This commit is contained in:
parent
cd71532dd7
commit
9ec3f4655e
|
@ -24,8 +24,8 @@ namespace :import_from_chandao do
|
|||
end
|
||||
|
||||
desc "bug数据"
|
||||
# 执行示例 bundle exec rake "import_from_chandao:bugs[企业内部工时管理系统.csv, 3]"
|
||||
# RAILS_ENV=production bundle exec rake "import_from_chandao:bugs[企业内部工时管理系统.csv, 3]"
|
||||
# 执行示例 bundle exec rake "import_from_chandao:bugs[企业内部工时管理系统.csv, 3, ceshi_org]"
|
||||
# RAILS_ENV=production bundle exec rake "import_from_chandao:bugs[企业内部工时管理系统.csv, 3, ceshi_org]"
|
||||
task :bugs, [:name, :pm_project_id, :org_login] => :environment do |t, args|
|
||||
org = Organization.find_by(login: args.org_login)
|
||||
if org.present?
|
||||
|
@ -59,8 +59,7 @@ namespace :import_from_chandao do
|
|||
issue.project_id = 0
|
||||
issue.pm_project_id = args.pm_project_id
|
||||
issue.pm_issue_type = 3
|
||||
sprint_name = randd_field_hash['所属迭代'].split('(#')[0]
|
||||
sprint = get_sprint_data(sprint_name, args.pm_project_id, org)
|
||||
sprint = get_sprint_data(randd_field_hash['所属迭代'].split('(#')[0], args.pm_project_id, org) rescue nil
|
||||
issue.pm_sprint_id = sprint['id'] if sprint.present?
|
||||
issue.save!
|
||||
requirement_issue = Issue.find_by(project_issues_index: randd_field_hash['相关需求'].split('(#')[1].split(')')[0], pm_project_id: args.pm_project_id, pm_issue_type: 1) rescue nil
|
||||
|
@ -77,8 +76,8 @@ namespace :import_from_chandao do
|
|||
end
|
||||
end
|
||||
|
||||
# 执行示例 bundle exec rake "import_from_chandao:tasks[复杂智能软件项目-所有任务.csv, 365]"
|
||||
# RAILS_ENV=production bundle exec rake "import_from_chandao:tasks[复杂智能软件项目-所有任务.csv, 365]"
|
||||
# 执行示例 bundle exec rake "import_from_chandao:tasks[复杂智能软件项目-所有任务.csv, 365, ceshi_org]"
|
||||
# RAILS_ENV=production bundle exec rake "import_from_chandao:tasks[复杂智能软件项目-所有任务.csv, 365, ceshi_org]"
|
||||
task :tasks, [:name, :pm_project_id, :org_login] => :environment do |t, args|
|
||||
org = Organization.find_by(login: args.org_login)
|
||||
if org.present?
|
||||
|
@ -117,8 +116,7 @@ namespace :import_from_chandao do
|
|||
issue.project_id = 0
|
||||
issue.pm_project_id = pm_project_id
|
||||
issue.pm_issue_type = 2
|
||||
sprint_name = randd_field_hash['所属迭代'].split('(#')[0]
|
||||
sprint = get_sprint_data(sprint_name, args.pm_project_id, org)
|
||||
sprint = get_sprint_data(randd_field_hash['所属迭代'].split('(#')[0], args.pm_project_id, org) rescue nil
|
||||
issue.pm_sprint_id = sprint['id'] if sprint.present?
|
||||
issue.save!
|
||||
requirement_issue = Issue.find_by(project_issues_index: randd_field_hash['相关需求'].split('(#')[1].split(')')[0], pm_project_id: pm_project_id, pm_issue_type: 1) rescue nil
|
||||
|
@ -131,8 +129,8 @@ namespace :import_from_chandao do
|
|||
end
|
||||
end
|
||||
|
||||
# 执行示例 bundle exec rake "import_from_chandao:requirements[企业网站第二期.csv, 3]"
|
||||
# RAILS_ENV=production bundle exec rake "import_from_chandao:requirements[企业网站第二期.csv, 3]"
|
||||
# 执行示例 bundle exec rake "import_from_chandao:requirements[企业网站第二期.csv, 3, ceshi_org]"
|
||||
# RAILS_ENV=production bundle exec rake "import_from_chandao:requirements[企业网站第二期.csv, 3, ceshi_org]"
|
||||
task :requirements, [:name, :pm_project_id, :org_login] => :environment do |t, args|
|
||||
org = Organization.find_by(login: args.org_login)
|
||||
if org.present?
|
||||
|
|
Loading…
Reference in New Issue