I need to get a list of all defects that had its schedule state changed in the last day. I managed to get all the changes in the last day, but that brings ANY changes made to defects - if someone changed the owner of a defect, that will be returned as well. I just want a list of snapshots that were the result of Schedule State changes. Is that possible with the Lookback API?
Asked
Active
Viewed 55 times
1 Answers
0
Something like this should work I think, in combination with your existing date range code:
{
"find": {
"_TypeHierarchy": "Defect"
"_PreviousValues.ScheduleState": { "$lte": "Accepted" }, //where accepted is your last state
},
"fields": ["ScheduleState", "Name", "_PreviousValues.ScheduleState"],
"hydrate": ["ScheduleState", "_PreviousValues.ScheduleState"]
}

Kyle Morse
- 8,390
- 2
- 15
- 16