Querying Milestones and their RevisionHistory by Project in WS API
Updated On:27-09-2018 07:41
CA Agile Central On Premise (Rally), CA Agile Central SaaS (Rally)
Unlike queries on other timeboxes, such as Release and Iteration, Milestone revision queries cannot be scoped using project query parameter.
1. MIlestone by Project:
A Milestone object does not have a Project attribute. It has a Projects attribute, which is a reference to a collection, and a TargetProject attribute Here is a result returned by an endpoint: https://rally1.rallydev.com/slm/webservice/v2.0/milestone?workspace=https://rally1.rallydev.com/slm/webservice/v2.0/workspace/12352608129&query=(FormattedID = MI1)&fetch=true
<Please see attached file for image>
Notice the TargetProject's ObjectID: 16662089077. If we construct the endpoint with the project query parameter instead of the workspace query parameter as follows:
It returns the same json as the endpoint with workspace parameter, which indicates that the project query parameter can be used with a Milestone query. The project query parameter here is not being simply ignored - it actually works. It's been tested by running this query in the browser's Incognito mode, while testing a milestone with a TargetProject that is not a default project of the current user (while also not being logged in to that project in another tab of the same browser window).
Note that using project query parameter and querying by Project attribute is not the same thing. Hitting this endpoint
Conclusions: a) Milestone query can use project query parameter (it uses TargetProject value) b) Milestones cannot be queried by Project attribute since there is no such attribute on Milestone. The outcome of (a) may be confusing when the same behavior is expected when using Project attribute on a Milestone or when querying for RevisionHistory of milestones with project query parameter (see #2 below).
2. Milestone RevisionHistory by Project
Unlike the RevisionHistory of other timbox types, Release and Iteration, RevisionHistory of Milestones cannot be queried with project query parameter.
Let's say we have a release in workspace 12352608129?and project?16662089077, and the reference to RevisionHistory of this release: /revisionhistory/35207573393
and we have a milestone in the same workspace?12352608129 and project 16662089077, and the reference to RevisionHistory of this milestone: /revisionhistory/33215216899
Endpoint examples below return Revisions for the same release. Project query parameter works with Revision endpoint for release: