1

我需要编写一个查询以从 Rally 中提取具有自定义字段和版本名称的给定值的用户故事(HierarchicalRequirement),并在 Java 应用程序中按迭代结束日期和用户故事排名作为第二个参数对它们进行排序。

我可以自己编写工作查询,但迭代结束日期的订单条件不起作用 *排名条件很简单:“排名降序”)

为了按迭代结束日期排序,我将字符串“Iteration.EndDate desc”传递给 SOAP API 的“order”参数,但它不起作用。

这有什么问题?

4

1 回答 1

2

我不知道如何使用 SOAP 但使用 REST api 很简单:http: //developer.rallydev.com/help/java-toolkit-rally-rest-api

 RallyRestApi restApi = new RallyRestApi(new URI("https://rally1.rallydev.com"), 
    "user@company.com", "password");

 QueryRequest stories = new QueryRequest("hierarchicalrequirement");
 stories.setFetch(new Fetch("FormattedID", "Name", "ScheduleState"));
 stories.setOrder("Iteration.EndDate DESC,Rank DESC");

 QueryResponse queryResponse = restApi.query(stories);
 if (queryResponse.wasSuccessful()) {
     for (JsonElement result : queryResponse.getResults()) {
         JsonObject story = result.getAsJsonObject();
         System.out.println(String.format("\t%s - %s: ScheduleState=%s",
             story.get("FormattedID").getAsString(),
             story.get("Name").getAsString(),
             story.get("ScheduleState").getAsString()));
     }
 }
于 2012-09-21T13:36:23.660 回答