1

如何优先获取积压缺陷,以及使用“.Net REST API”重新打开缺陷?


我试过这个,但是 request.Query = new Query("Iteration", Query.Operator.Equals, null).and( new Query("Release", Query.Operator.Equals, null)); 正在抛出 NullReferenceException

4

1 回答 1

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,然后检查每个修订的描述以了解对 state 字段的更改。

于 2012-08-27T19:19:02.930 回答