Rally Software

 View Only
  • 1.  How to get grand parent Object ID of a child in Agile Central API

    Posted Jun 06, 2017 02:38 AM

    I am working on my Asp.net MVC application with Rally API , I am forming tree structure using Rally Data. I am pulling from 'ProjectsPermissions' table with relation. Here I am facing a issue like below:

    A - GP - Have Access
    B- Parent - Not Have Access
    C- Children - Have Access.

    I need to form a tree node C under A node, but data is like Immediate parent relation to child, I think there will no direct relation with grand parent and child. If parent dosen't have access I am getting parent attribute as null. By this I am not able to form tree. can any one help me on this?



  • 2.  Re: How to get grand parent Object ID of a child in Agile Central API

    Posted Jun 08, 2017 10:28 AM

    Hi SanjayCh,

     

    You are correct that there is no way to find the Grand Parent from the Child. You should be able to open a case with support on that issue since it seems to be a bug. 

     

    As a workaround, you can build the tree using Children collection endpoint of the Grand Parent project. In your example above, C project should be returned from the following WSAPI request if you substitute the grand parent project's ObjectID for "ObjectID" below:

     

    https://rally1.rallydev.com/slm/webservice/v2.0/project/ObjectID/Children

    This reference url is also part of the response under the "Children" attribute

     



  • 3.  Re: How to get grand parent Object ID of a child in Agile Central API

    Posted Jun 08, 2017 11:03 AM

    Hi grann19,

     

    Thank you so much for reply.

     

    As per your suggestion I think you are saying like if we want to get  grand parent object ID from Child project, we need to build from grand parent first. But , In case of mine, we are looking from lower level to upper level. Technically, when we are form a tree, we are building tree with parent-child relation. when child project comes in the result list, we will identify its parent and will form child node under that parent node. But in above case, we have grand parent and child, since we doesn't  have parent, we need to form child node under its grand parent. so, issue comes here, we are unable to identify child's grand parent, since relation is missing with parent project between grand parent and child. so, can you please give me some more alternative ways to resolve it.



  • 4.  Re: How to get grand parent Object ID of a child in Agile Central API

    Posted Jun 08, 2017 11:26 AM

    I would start with querying all projects with (Parent = null) and then query their children using the collection endpoint I mentioned above to construct the tree. So your requests might look something like this.

     

    Request 1: https://rally1.rallydev.com/slm/webservice/v2.0/project/?query=(Parent = null)

    Result 1: [{ObjectID: 1}, {ObjectID: 2}]

     

    Request 2: https://rally1.rallydev.com/slm/webservice/v2.0/project/1/Children

    Result 2: [{ObjectID: 3, ObjectID:4}]

     

    Request 3: https://rally1.rallydev.com/slm/webservice/v2.0/project/3/Children

    Request 4: https://rally1.rallydev.com/slm/webservice/v2.0/project/4/Children

    then repeat down the tree until there are no children