在Rally中,只需在UI中点击几下即可重新创建任务。当许多任务必须被重新制定时,一次做一个是不切实际的。 “Multi-Edit:Task”页面上的下拉菜单允许更改“名称”,“状态”,“估计”,“待办事项”和“所有者”,但即使将此列添加到“任务摘要”页面上的自定义视图中,也不允许更改“工作产品”。 / p>
答案 0 :(得分:0)
无法在UI中将任务批量重新分配给其他用户素材。这是一个Ruby代码,使用Rally Ruby REST tookit
将基于标签的一组任务重新分配给不同的故事。
它使用stop_after
变量只是为了在批量编辑中放置一些护栏。
require 'rally_api'
headers = RallyAPI::CustomHttpHeader.new()
headers.name = "bulk action: set workproduct on tasks"
headers.vendor = "Nick M RallyLab"
headers.version = "1.0"
config = {:base_url => "https://rally1.rallydev.com/slm"}
config[:username] = "user@co.com"
config[:password] = "secret"
config[:workspace] = "W"
config[:project] = "P1"
config[:headers] = headers
@rally = RallyAPI::RallyRestJson.new(config)
query = RallyAPI::RallyQuery.new()
query.type = :task
query.fetch = "Name,FormattedID,Description,WorkProduct"
query.workspace = {"_ref" => "https://rally1.rallydev.com/slm/webservice/v2.0/workspace/1111" }
query.project = {"_ref" => "https://rally1.rallydev.com/slm/webservice/v2.0/project/2222" }
query.page_size = 200 #optional - default is 200
query.limit = 1000 #optional - default is 99999
query.project_scope_up = false
query.project_scope_down = true
query.order = "Name Asc"
query.query_string = "(Tags.Name = tag1)"
story = {"_ref" => "https://rally1.rallydev.com/slm/webservice/v2.0/hierarchicalrequirement/33333" }
tasks_results = @rally.find(query)
tasks = [];
stop_after = 10
count = 0
tasks_results.each do |t|
count +=1
break if count > stop_after
puts "Name: #{t["Name"]}, FormattedID: #{t["FormattedID"]}"
t.read
tasks << t
end
tasks.each do |t|
puts "acting on Name: #{t["Name"]}, FormattedID: #{t["FormattedID"]}"
field_updates = {"WorkProduct" => story}
t.update(field_updates)
end