Ruby에서 rally_api gem을 사용하고 있습니다. 누구든지 특정 반복에서 모든 결함을 가져 오는 쿼리를 작성하는 방법을 제안 할 수 있습니까?
require 'rally_api'
headers = RallyAPI::CustomHttpHeader.new()
headers.version = "1.0"
config = {:base_url => "https://rally1.rallydev.com/slm"}
config[:username] = "mvcmxb"
config[:password] = "kjkjk"
config[:workspace] = "Persons"
config[:project] = "Business he does"
config[:headers] = headers
@rally = RallyAPI::RallyRestJson.new(config)
test_query = RallyAPI::RallyQuery.new()
test_query.type = "defect"
test_query.fetch = true
results = @rally.find(test_query)
다음은 반복을 통해 결함을 쿼리하고 해당 설명이 업데이트되는 코드 예제입니다. 반복 이름으로 쿼리 할 수 있습니다.
query.query_string = "(Iteration.Name = \"i10\")"
또는 반복 참조 :
query.query_string="(Iteration = /iteration/13589769934)"
이름은 고유하지 않지만 쿼리도 프로젝트에 의해 바인딩됩니다.
rally = RallyAPI::RallyRestJson.new(config)
query = RallyAPI::RallyQuery.new()
query.type = :defect
query.fetch = "Name,FormattedID,Iteration,Description"
query.project = {"_ref" => "https://rally1.rallydev.com/slm/webservice/v2.0/project/12352608219.js" }
query.project_scope_up = false
query.project_scope_down = false
query.order = "Name Asc"
#query.query_string = "(Iteration.Name = \"i10\")"
query.query_string="(Iteration = /iteration/13589769934)"
results = rally.find(query)
results.each do |d|
puts "FormattedID: #{d["FormattedID"]}, Iteration: #{d["Iteration"]["Name"]}"
d.read
fieldUpdates = { "Description" => "bad defect"}
d.update(fieldUpdates)
end
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다