我正在尝试使用 SnapshotStore 数据存储的排序配置按优先级顺序获取特定投资组合项目的所有缺陷,但它不起作用。我会以错误的方式解决这个问题吗?
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);
},