Rally Software

 View Only
  • 1.  How to get Master parent node details from CA Agile Central/Rally

    Posted Apr 11, 2017 10:54 AM

    I am trying to get master parent when I pass sub child ID like below

    Request storiesRequest1 = new Request(leastchildId);
    storiesRequest1.Query = new Query("State", Query.Operator.Equals, "Open");
    storiesRequest1.ProjectScopeUp = true;
    storiesRequest1.ProjectScopeDown = true;
    storiesRequest1.Order = "Name";
    storiesRequest1.Fetch = new List<string>()
    {
                    "Name",
                    "ObjectID",
                   "Parent",
                   "Children",
                   "State",
                   "FundingPPMOpticsID"
      };
      QueryResult queryStoryResults1 = restApi.Query(storiesRequest1);

      rst = queryStoryResults1.jsonResult;

    In above case , I am only getting parent node of passed ID, I want to get master Parent

    A - Need to Get this Parent ID
    1-
    2-
    2a -
    2b -
    2.1a - Passing child ID

    Please help me to get this.



  • 2.  Re: How to get Master parent node details from CA Agile Central/Rally

    Posted Apr 11, 2017 06:10 PM

    Hi SanjayCh ,

     

    The Parent object attribute has a 1 to 1 relationship for HierarchicalRequirements. So a HierarchicalRequirement object only has a reference to it's direct parent. This means you would need to create some programming logic to get the top level parent. You could do some type of loop testing the HasParent attribute, until it returns false.

     

    Let me know if that helps,

    Sean Davis