Reputation: 286
I need to write a query to extract from Rally the user stories (HierarchicalRequirement) with a given value for a custom field and release name, ordering them by their iteration end-date first and user story rank as second parameter, in a Java application.
I can write the working query itself, but the order condition on the iteration end date doesnt work *the condition on the rank is straightforward: "Rank desc")
To order by iteration end date I passed to the "order" parameter of the SOAP API the string "Iteration.EndDate desc" but it doesnt work.
What's wrong with this?
Upvotes: 1
Views: 1775
Reputation: 8410
I'm not sure how to do this with SOAP but with the REST api it is straightforward: http://developer.rallydev.com/help/java-toolkit-rally-rest-api
RallyRestApi restApi = new RallyRestApi(new URI("https://rally1.rallydev.com"),
"[email protected]", "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()));
}
}
Upvotes: 2