Can I query RevisionHistory to find defects that I used to be the Owner, but were later reassigned to another user?
WS API does not lend itself to retrieving historic data. Parsing Revisions to match
"OWNER changed from [<User>@<Company.com>] to"
is expensive and inefficient.
In Rally SaaS (but currently not in on-premises Rally instances) you may use Lookback API designed to work with historic data.
Here is an example of Lookback API query that returns artifacts where defect Owner was reset from my user to some other user:
https://rally1.rallydev.com/analytics/v2.0/service/rally/workspace/<WORKSPACE_OID>/artifact/snapshot/query.js?find={"Project":<PROJECT_OID>,"_TypeHierarchy":"Defect","_PreviousValues.Owner":<USER_OID>}&fields=["ObjectID","_ValidFrom","_ValidTo","FormattedID","Owner","_PreviousValues.Owner"]&compress=true
Replace placeholder ObjectID values with valid ObjectID values before trying it in your environment.
Here is a fragment of the returned json:
TotalResultCount: 1, StartIndex: 0, PageSize: 100, ETLDate: "2014-11-20T16:48:48.254Z", CompressedResultCount: 1, Results: [ { _ValidFrom: "2014-11-20T16:48:48.254Z", _ValidTo: "9999-01-01T00:00:00.000Z", ObjectID: <OBJECT_ID>, Owner: <USER_OID>, _PreviousValues: { Owner: <USER_OID> }, FormattedID: "DE6" } ] }
Lookback API is language agnostic. There is currently no built-in support for it in Rally toolkits for .NET, Java, Ruby or Python, but it has a built-in support in javascript AppSDK2. SnapshotStore in AppSDK2 can retrieve data from Lookback API.