如何使用优先级获取积压缺陷,还使用“.Net REST API”重新打开缺陷?
我试过这个,但是 request.Query = new Query(“Iteration”,Query.Operator.Equals,null).and( new Query(“Release”,Query.Operator.Equals,null)); 抛出NullReferenceException
答案 0 :(得分:0)
这里有一些代码示例:http://developer.rallydev.com/help/rest-api-net
要获得积压缺陷,包括优先级字段,您需要执行以下操作:
RallyRestApi restApi = new RallyRestApi("username", "password", "https://rally1.rallydev.com", "1.24");
Request request = new Request("defect");
request.Fetch = new List()
{
"Name",
"Description",
"FormattedID",
"Priority"
};
request.Query = new Query("Iteration", Query.Operator.Equals, null).and(
new Query("Release", Query.Operator.Equals, null));
QueryResult queryResult = restApi.Query(request);
foreach(var result in queryResult.Results)
{
//Process item
string priority = result["Priority"];
}
要检查重新打开的缺陷,您还需要获取Revisions和RevisionHistory,然后检查每个修订版的描述以更改状态字段。