"Fixed" => "Closed". I would..." /> "Fixed" => "Closed". I would..." /> "Fixed" => "Closed". I would..."/>

How to use Lookbackapi to fetch all the _PreviousValues of a field

101 Views Asked by At

I am trying to get all the "_PreviousValues" of a field.

For example, the state of a defect have changed from "Open" => "Fixed" => "Closed".

I would like to get all history of the state, but not just the previous value.

Thanks!

1

There are 1 best solutions below

2
On BEST ANSWER

LookbackAPI returns historic versions (snapshots) of objects. To get a history of state transitions you need to get all snapshots where transition happened, which can be achieved by using "_PreviousValues.State":{"$exists":true} condition.

https://rally1.rallydev.com/analytics/v2.0/service/rally/workspace/111/artifact/snapshot/query.js?find={"Project":222,"_TypeHierarchy":"Defect","_PreviousValues.State":{"$exists":true}}&fields=["ObjectID","_ValidFrom","_ValidTo","FormattedID","State","_PreviousValues.State"]&hydrate=["State","_PreviousValues.State"]&compress=true