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

老子叫甜甜 提交于 2019-12-11 21:28:49

问题


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.


回答1:


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,...]



来源:https://stackoverflow.com/questions/22926504/using-lookback-api-how-to-find-tasks-that-did-not-have-a-change-in-todo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!