2

I am trying to extract items from different TypeHierarchies from a single query. 3 of the attributes are from "HierarchicalRequirement" while 3 other are from "PortfolioItem".

My question is, can I mention multiple TypeHierarchies in a single query? in the find, like this:

"find" => {"_ProjectHierarchy" => projectID, "_TypeHierarchy" => ["HierarchicalRequirement","PortfolioItem"] , "ScheduleState" => "Accepted" }

Thanks!

Denim Datta
  • 3,740
  • 3
  • 27
  • 53
Rohan Dalvi
  • 1,215
  • 1
  • 16
  • 38
  • Solved it myself, we do not need to worry about adding multiple type hierarchies, Rally does it on its own. On specifying the fields that we need, we need not mention different typeHierarchies separately. It automatically imports them. – Rohan Dalvi Sep 17 '13 at 14:56

1 Answers1

1

You are correct, the LookbackAPI figures out what field belongs to what hierarchy type. PortfolioItem has field "State" and HierarchicalRequirement has field "ScheduleState". Just to illustrate your answer for the benefit of other users here is a screenshot of results fragment from a query that specifies two types "_TypeHierarchy":{$in:["PortfolioItem","HierarchicalRequirement"]} :

https://rally1.rallydev.com/analytics/v2.0/service/rally/workspace/1111/artifact/snapshot/query.js?find={"_ProjectHierarchy":12352814790, "_TypeHierarchy":{$in:["PortfolioItem","HierarchicalRequirement"]},"__At":"2013-08-01T00Z"}&fields=["_TypeHierarchy","_UnformattedID","ScheduleState","State"]&hydrate=["_TypeHierarchy","ScheduleState","State"]

enter image description here

nickm
  • 5,936
  • 1
  • 13
  • 14