I am tring to use Lookback API. I want to get all features change during a release.
What I tried :
LookbackQuery query = lookbackApi.newSnapshotQuery();
query.addFindClause("_TypeHierarchy", "PortfolioItem");
query.addFindClause("ObjectID", "280075838440");
Map previousValue = new HashMap();
previousValue.put("$exists", "true");
query.addFindClause("_PreviousValues.Release", previousValue);
query.requireFields("_SnapshotDate", "_SnapshotNumber", "FormattedID",
"Name", "Release","_PreviousValues.Release").hydrateFields("Release, _PreviousValues.Release");
LookbackResult resultSet = query.execute();
I have this exception :
Exception in thread "main" com.rallydev.lookback.LookbackException: Query Error: incomplete intersection between 'hydrate' clause of [Release, _PreviousValues.Release] with 'fields' clause of [_SnapshotNumber, _PreviousValues.Release, _SnapshotDate, FormattedID, Release, Name] at com.rallydev.lookback.LookbackResult.validate(LookbackResult.java:101) at com.rallydev.lookback.LookbackApi.executeQuery(LookbackApi.java:233) at com.rallydev.lookback.LookbackQuery.validateAndRun(LookbackQuery.java:243) at com.rallydev.lookback.LookbackQuery.execute(LookbackQuery.java:59) at fr.mipih.rally.TestLoockback.main(TestLoockback.java:38)
But when I tried directly via: https://eu1.rallydev.com/analytics/v2.0/service/rally/workspace/9396539899/artifact/snapshot/query.js?hydrate=["Release","_PreviousValues.Release"]&start=1&pagesize=2000&find={$and: [{"ObjectID": 280075838440},{"_PreviousValues.Release": {"$exists":true}}]}&fields=["_SnapshotDate","_SnapshotNumber","FormattedID","Name","Release","_PreviousValues.Release"] then I get some results!
Could you help me please and show me what I did wrong ?