Rally Software

 View Only
Expand all | Collapse all

How to get all the milestones under a rally projects and its sub projects?

  • 1.  How to get all the milestones under a rally projects and its sub projects?

    Posted May 07, 2019 02:52 AM

    Is there any way to get all the milestones under a project and with its sub projects through web service?

    I know, we can use a filter like Projects contains /project/<<project_id>> but it does not return the milestones where all the projects are selected.

     

    Is there any way to call a web service which returns all the milestones under a project and its sub projects and also those milestones where all the projects are selected.

     

    Since, target project is also getting set as null, please suggest a way without the use of target project for fetching milestones.



  • 2.  Re: How to get all the milestones under a rally projects and its sub projects?

    Broadcom Employee
    Posted May 07, 2019 05:47 AM

    Hi Tiwary,

    I found this help article that might help. Please take a look when you have the chance.

     

    https://comm.support.ca.com/kb/querying-milestones-and-their-revisionhistory-by-project-in-ws-api/KB000057533



  • 3.  Re: How to get all the milestones under a rally projects and its sub projects?

    Posted May 07, 2019 06:02 AM

    Thank you for the response. Yes, I have gone through this article, but in this article, milestones are being fetched by the TargetProject's ObjectID. But when I am creating a new milestone, target project is getting set as null and hence I am not able to get the data based on TargetProject. In addition, how can we fetch those milestones which are selected in all the projects? Because those milestones will have TargetProject as null, and there won't be any projects associated with it. Please suggest a way to fetch the milestones where all the projects are selected.



  • 4.  Re: How to get all the milestones under a rally projects and its sub projects?

     
    Posted May 07, 2019 09:53 AM

    Hey there -- so I started by hitting the Milestone endpoint, but specifying the Parent Project, and made sure I am scoping down and not up. That seemed to give me the desired result:

     

    https://rally1.rallydev.com/slm/webservice/v2.0/milestone/?project=/project/23112780161&projectScopeDown=true&fetch=FormattedID,Name,Projects,TargetProject,TargetDate&pagesize=2000&start=1&projectScopeUp=false

     

    Or as cURL:

    curl -i -X GET \
    'https://rally1.rallydev.com/slm/webservice/v2.0/milestone/?project=%2Fproject%2F23112780161&projectScopeDown=true&fetch=FormattedID%2CName%2CProjects%2CTargetProject%2CTargetDate&pagesize=2000&start=1&projectScopeUp=false'


  • 5.  Re: How to get all the milestones under a rally projects and its sub projects?

    Posted May 08, 2019 01:35 AM

    Hey John, thank you for your response. I tried hitting the endpoint the way you have mentioned, but it returns all the milestones of the workspace and not project wise.

    Suppose, I have a workspace, and I have two projects in that workspace, let's say project-1 and project-2. When I hit the endpoint by specifying project-1's id, it returns all the milestones of the workspace which also includes milestones of project-2, which shouldn't be the case. But what I want is the milestones of project-1 and the milestones where all the projects are selected.

     

    Following are the screenshots :

    I have this project, where I have 7 milestones.

    Sample Project Milestones

    When I hit the URL, with this project ID, following is the endpoint response:

     

    As you can see the API response count is 42 and I have only 7 milestones in that project. The endpoint returns the milestones of the other projects from the same workspace, as you can see the last red box with Formatted ID "MI8141" does not exist in the above project screenshot, however the API response includes this.

     

    So, please suggest a way where I can fetch the milestones of a particular project which also includes the milestones where all the projects are selected. 



  • 6.  Re: How to get all the milestones under a rally projects and its sub projects?

    Broadcom Employee
    Posted May 08, 2019 10:29 AM

    Hi Tiwary.

     

    There is a bit of a misconception here which I'm hoping to help clarify.

     

    Rally provides 3 types of timeboxes: Milestones, Releases and Iterations. They serve different purposes and are intended to encompass quite largely different time frames. Releases and Iterations are designed for relatively short time frames and they are part of a single project. You create these timeboxes within a given project and they exist within its boundaries.

     

    Milestones are different. Milestones are designed to be a check/delivery point much larger in time for multiple projects. The Milestone timebox does not exist within the boundaries of a given project but instead multiple projects are scoped to the milestone. You can see it as a relationship of inclusion or association where the projects are included or are 'part of' a milestone.

     

    Once associated with a milestone, you can get the list of these projects by fetching the "Projects" field of your milestone. For example, see in your screenshot that the Projects field is a reference to a collection of projects. In your screenshot it so happens that there is only 1 project in that collection, you can see it in the Count that's part of the Projects field reference. If you shall include/scope additional projects to your milestone they will be part of that collection and the counter will accurately update.

     

    With this practice the milestone isn't 'under' a project, as you had asked. If anything, it's more the other way around where the project is part of or associated with the milestone. If you wanted to find all the milestones that a given project belongs to you can execute a query against the Milestones endpoint with a query filter for your project, such as: (Projects.Name = "My Project") . Another alternative for such a query filter could be: (Projects.ObjectID = <Your Project OID>) . In this mode the projects that are part of milestones don't have to conform to any hierarchical structure and therefore there isn't a straight forward way to find the hierarchy of projects of this milestone. So, for example, if I were to associate "My Project" to the milestone along with a few of its children projects, then, I can run this example query filter for each project individually. There isn't is in this mode to query for all the milestones that include both "My Project" as well as any of its hierarchy. 

     

    You can also choose to dedicate a milestone to a project. A possible reason to do is if you have a heavy-duty project that has an extensive project hierarchy underneath where it makes sense that a milestone of a large time frame will be dedicated only to that hierarchy and not go beyond it to other projects outside of it. If you wanted to do that then you can update the milestone's TargetProject field. As you had mentioned this field is not set by default and there isn't a way to set it from the user interface. However, you can use a WSAPI post command and update this field. Once you did then the Projects field collection will be replaced with the entire hierarchy that's under the project you're targeting. In this mode you can fetch the Projects field and rely on that it shall include the hierarchy under your target project. 

     

    Please let us know if this helped and if next questions.

     

    Thanks,

    Sagi



  • 7.  RE: Re: How to get all the milestones under a rally projects and its sub projects?

    Posted Nov 30, 2019 03:39 PM
    Hello and thank you. Related question:

    In a Custom List App I am trying to display all but only the Features of a specific Milestone. I am trying different things in the App's Settings' Query, for example
    "(Milestone.ObjectID = MI18552)"
    but nothing is working so far. And I cannot find anything in the Help around Queries relating to Milestones either.

    Please advise.


  • 8.  RE: Re: How to get all the milestones under a rally projects and its sub projects?

    Broadcom Employee
    Posted Dec 02, 2019 04:47 AM
    Carlos, try something like this:

    (Milestones.FormattedID contains MI18552)

    It should generate a fetch like this:

    https://rally1.rallydev.com/slm/webservice/v2.0/portfolioitem/feature?query=(Milestones.FormattedID%20contains%20MI1)&fetch=true&start=1&pagesize=20


    ------------------------------
    Nik
    Rally Sales Engineer
    Rally Software
    ------------------------------



  • 9.  RE: Re: How to get all the milestones under a rally projects and its sub projects?
    Best Answer

    Posted Dec 02, 2019 05:38 PM
    Thank you both, but note that Support got back as well, with this solution: (Milestones.FormattedID = "MI18552")

    Which does work as well. (And which I thought I had tried too but maybe not. Or without the quotes...)


  • 10.  RE: Re: How to get all the milestones under a rally projects and its sub projects?

    Posted Dec 02, 2019 08:49 AM
    Milestones.Name and Milestones.TargetDate are the items you want to query. Notice the "s"

    ------------------------------
    Benefitfocus.com, Inc
    ------------------------------