Rally Software

  • 1.  Set project for milestone

    Posted May 11, 2018 12:07 PM

    Hi,

    We have a client application in java where we hit rally through rest tool kit to get the required info. In order to get required information i set workspace and project to a request, every level i am getting response as expected except for milestones, for milestones though i set project i am getting all the milestones under the workspace. can you please help me in setting project for milestone request.

     

    Thanks,

    Manoj.



  • 2.  Re: Set project for milestone

    Broadcom Employee
    Posted May 11, 2018 12:46 PM

    Hi Manoj,

     

    In order to get the projects that are associated with a milestone, you need to get a handle of the milestone, the use the 'Projects' field and fetch the collection of projects.

     

    From the milestone object , see:

     

     

    It sounds to me as if you're trying to get the milestones of a project where I'm not sure there is a way to do that. As you said, you may get all milestones first, then find the projects of each milestone as mentioned above.

     

    Let us know if this is helping you.

     

    Thanks,

    Sagi



  • 3.  Re: Set project for milestone

    Posted May 11, 2018 01:10 PM

    Hi Sagi,

    I queried for iterations under project xyz and i got response as expected (iterations of particular project), where as if i tried the same way to get milestones info and got milestones for all projects under workspace, both iterations and milestones are part of timeboxes i want to know why it is working for iterations and why not for milestones? can you please help me 

     

    This is the code for request 

    QueryRequest request = new QueryRequest("iteration);
    request.setworkspace("/workspace/************");
    request.setproject("/project/*************");

    Thanks,
    Manoj.


  • 4.  Re: Set project for milestone
    Best Answer

    Broadcom Employee
    Posted May 11, 2018 03:00 PM

    Hi Manoj.

     

    You actually raise up a good point. There is a difference between Iterations and Milestones but it's not very well explained (in my opinion) in the documentation. They are both time boxes but they are not the same. 

     

    Iteration belongs to a project. You create it under a project, when you view it you can see the project it belongs to. Therefore, in your code you can set a workspace and set a project and then query for an iteration. Rally will look for iterations in the context of the workspace and project you're asking for.

     

    Milestones, however, do not belong to a project. They belong to a workspace. Milestone may include any or all of the projects of that workspace but it doesn't 'belong' to the projects. Milestones are similar to projects themselves. The projects in-fact are part of the milestone. Therefore, from your code's perspective, you can not set up a context for a milestone that will be a workspace and a project. A project can not set a context for a milestone. The context for the milestone is the workspace alone. That's why if you set a project , it's ignored and you're getting the milestones defined for your workspace.

     

    In my earlier reply, what I tried to convey is that if you're interested to know if a certain project is part of a milestone (again, a milestone is not part of a project) then you can query for the milestone, then look at the Projects collection field (see that screen shot earlier) to find if a specific project is part of that milestone.

     

    You can learn more on Milestones here:

    Create and Manage Milestones | CA Agile Central Help 

     

    But , as said, I do feel as well this documentation isn't very clear on that difference.

     

     

    I'd also like to share with you the object model so that you actually see the difference.

     

    Both an Iteration and Milestone belong with a Workspace. However,

     

    Iteration - You can see in the WSAPI docs that the iteration is associated with one project.

     

    Milestone - You can see more than just one project is associated with the milestone. Also, from the endpoint construction you can learn that the projects are 'underneath' the milestone.

     

     

    I hope this makes it a bit more clear. Please let us know if it does.

     

    Thanks,

    Sagi



  • 5.  Re: Set project for milestone

    Broadcom Employee
    Posted May 11, 2018 03:06 PM

    Hi Manoj,

     

    And to finish up on this whole thing:

     

    If you look at the Project object definition you can find it has a pointer to a collection of Iterations, but it does not have any reference to Milestones.

     

     

    So, to conclude:

    If you set up a context of workspace and project and then you can find the iterations, but not the milestones. The milestones will be taken from the context of the workspace only , and ignore the project.

     

    If you are interested to know if a certain project is or isn't associated with a milestone then you need to query the Milestone object, point at the Projects field and see if that project is there.

     

     

    I hope this helps.

     

    Sagi



  • 6.  Re: Set project for milestone

    Posted May 11, 2018 03:12 PM

    Sagi,

     

    I am able to get the list of projects tied to the milestone, but i didn't get the milestones under a project ,which you cleared why i am not.. 

    Thanks for the response.

     

    Manoj.



  • 7.  Re: Set project for milestone

    Posted May 11, 2018 03:06 PM

    Thanks Sagi,

     

    I understood, so request for milestones will not consider project even if you specify.. Thanks for the response..