rallylookbackapi

using Lookback API how to find tasks that did not have a change in ToDo?


I am writing an app that shows a grid of tasks, filtered by iteration, where ToDo has not been modified within certain time frame. Per documentation Iterations on Tasks are not available in LookbackAPI, but there is a second question: how to find tasks that did not have a change in ToDo within a time period specified? Thank you.


Solution

  • You may apply this filter

    "_PreviousValues.ToDo":{$exists: false} 
    

    to get snapshots where ToDo was not modified.

    This query looks for Tasks in a specific project, and limit the time frame:

    https://rally1.rallydev.com/analytics/v2.0/service/rally/workspace/1111/artifact/snapshot/query.js?find={"_ProjectHierarchy":2222,"_TypeHierarchy":"Task","_PreviousValues.ToDo":{$exists: false},_ValidFrom:{$gte: "2014-04-XXTxx:xx:00.000Z",$lt: "2014-04-XXTxx:yy:00.000Z"}}&fields=["_UnformattedID","ToDo","_PreviousValues.ToDo"]
    

    A slightly different "_PreviousValues.ToDo":null returns the task's first snapshot that corresponds to the original revision when ToDo was not set in addition to the same snapshots returned when filtered by "_PreviousValues.ToDo":{$exists: false}

    As far as filtering tasks by iteration, you may use Rally.data.wsapi.Store to get ObjectIDs of the tasks filtered by iteration, and then Rally.data.lookback.SnapshotStore filtered by the array of OIDs

    {
         property: 'ObjectID',
         operator: 'in',
         value: arr
    }
    

    where arr is [123456789, 987654321,...]