I'm attempting to get all defects for a specific portfolio item, in priority order, using the sort config of the SnapshotStore datastore, but its not working. Am I going about this the wrong way?
getSnapshots : function(record, doneCallback) {
app.log("getDefectSnapshots"+record.get("ObjectID"));
var that = this;
var fetch = ['ObjectID','FormattedID','_UnformattedID','Name','State','Priority','Severity','_ItemHierarchy','_TypeHierarchy'];
var hydrate = ['_TypeHierarchy','_ItemHierarchy','State','Priority','Severity', 'Project'];
var find = {
'_TypeHierarchy' : { "$in" : ["Defect"]},
'_ProjectHierarchy' : { "$in": app.currentProject.ObjectID },
'__At' : 'current',
"_ItemHierarchy" : { "$in" : record.get("ObjectID") }
};
var storeConfig = {
autoLoad : true,
fetch: fetch,
find : find,
hydrate: hydrate,
sort: {'Priority':1},
limit: 'Infinity',
listeners : {
scope : this,
load: function(store, snapshots, success) {
app.log("completed snapshots:", snapshots.length);
doneCallback(null,snapshots);
}
},
pageSize:1000
};
var snapshotStore = Ext.create('Rally.data.lookback.SnapshotStore', storeConfig);
},