Rally Software

Expand all | Collapse all

no milestones query string

Jump to Best Answer
  • 1.  no milestones query string

    Posted 05-31-2018 08:03 AM

    Userstories with no Milestones set query

     

    I want to query for Userstories with have NO milestones set. what is the sytax I should use...e.g.

     

    (Milestones = null) ?

    tried all kinds of combination and nothing seems to work for a query string.

     

    I was able to build a custom app and use a store filter function that does work, but wanted to know if there is some syntax of a query sting to do the same thing.

    store filter function that works...

    store.filterBy( function (record) {
       if (record.get('Milestones').Count === 0) {
          return true;
       } else {
          return false;
       }
    });



  • 2.  Re: no milestones query string
    Best Answer

    Posted 05-31-2018 08:38 AM

    Well, it seems a bit shifty, but you can try:

     

    ( Milestones.ObjectID = null )

     

    I'll check with the Engineering Team to see if there is a better way...

     

    Michael



  • 3.  Re: no milestones query string

    Posted 05-31-2018 08:41 AM

    yep, that did it. Duh, seems obvious now. thanks for the help



  • 4.  RE: Re: no milestones query string

    Posted 06-18-2019 06:41 PM
    what would be the syntax for query against a specific milestone
    I have tried
    (Milestones.ObjectID = "MI4524")
    (Milestones = "MI4524")
    (Milestones = MI4524)
    (Milestones = "Q2 P&T Release Target 2019")
    (Milestones = Q2 P&T Release Target 2019)

    and all I ever see is "Based on your selections, no work items data was found.

    The milestones exists at the level I am querying against and it is the only filter I am using and I know for a fact that there are items associated with this milestone.

    ------------------------------
    Jeff Myers
    Agile Transformation Coach
    Unify Consulting
    Seattle WA
    ------------------------------



  • 5.  RE: Re: no milestones query string

    Posted 06-18-2019 06:56 PM
    (Milestones.FormattedID = MI4524)


  • 6.  RE: Re: no milestones query string

    Posted 06-18-2019 07:22 PM
    I'll try to verify, but first guess:  Milestones.FormattedID = MI4524


  • 7.  RE: Re: no milestones query string

    Posted 06-18-2019 09:44 PM
    Hi everyone.

    Reading this discussion it's not clear if what is asked is how to make a direct query to the Milestone endpoint itself, or whether to make a request to the HierarchicalRequirement endpoint (user story) and fetch user stories that have certain criteria of milestones. Perhaps it is clear to everyone, but to make certain, I'll clarify:

    - Milestones are objects stored in an endpoint named: "Milestone" (not Milestones). If you wanted to query milestones without any regard to associations with other objects such as user stories, then you should query against this endpoint. You can apply filters such as Name, ObjectID, FormattedID etc...

    See this example of how to query for a milestone with FormattedID of 'MI1' . Similarly, you can filter by name, objectid etc..:
    https://rally1.rallydev.com/slm/webservice/v2.0/milestone?query=(FormattedID = "MI1")

    - Milestones (not Milestone) is a name of a field of a user story. The endpoint of the user story is named: "HierarchicalRequirement". If essentially you are trying to get user stories with different filtering on their associated milestones then you shall query this endpoint to result with user stories. To formulate the query based on that field, you'll need to form a convention of Milestones.field_name where 'field_name' is a name of a field that belongs to the Milestone object (mentioned previously). Such a filter could be: Milestones.Name if you wanted to filter by the name of the milestone, or Milestones.FormattedID if you wanted to filter by the formatted id of the milestones etc...

    See this example of how to query for user stories that are associated with a milestone with FormattedID of 'MI1':
    https://rally1.rallydev.com/slm/webservice/v2.0/hierarchicalrequirement?query=(Milestones.FormattedID = "MI1")


    I hope this helps.

    Sagi


  • 8.  RE: Re: no milestones query string

    Posted 06-19-2019 08:16 AM
    Another query we've used is the Milestones.TargetDate. We have several releases that happen on the same date, so we can enumerate the work items by date and not by an exact name or a partial string match in a name.

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