문제

I am trying to get those user stories that have parent of type feature. Here's my code:

QueryRequest request = new QueryRequest("HierarchicalRequirement");
request.setFetch(new Fetch("Name,FormattedID, Parent, Feature"));
request.setQueryFilter(new QueryFilter("Feature.FormattedID","=","F1119").and(new QueryFilter("Parent._type","=","PortfolioItem/Feature")));
QueryResponse response = this.rest.query(request);
if(response.wasSuccessful()){
....
}

The response returned is valid when I remove the Parent Type filter. I get those stories that have Feature F119 . For some reason, when I explore the top level story in Rally, I can see that it has a parent Feature, but the Parent returned via query is null.

No stories are returned when I add Parent Type Query filter .

도움이 되었습니까?

해결책

Per WS API object model a HierarchiclaRequirement object has Parent attribute that points to another HierarchiclaRequirement (a Parent story), a Feature attribute that references PI/Feature object that could be either its direct PI/Feature parent or the parent of it's parent user story, and a PortfolioItem attribute that points to its immediate PI/Feature parent

Given this scenario and hierarchiclarequirement queries below: US1 parent story and US2 child story, and the PI/Feature "parent" of US1 is F1:

(PortfolioItem.FormattedID = F1) 

returns US1 that has a parent Feature. It does not return US2.

(Feature.FormattedID = F1)

returns both the epic and it's child, US1 and US2.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top