1
您好我想必须包含2个过滤器首先要筛选基于包含“自邮”字名的关键字数据的功能,下一个是基于在迭代框中。我试着做,但网格显示没有数据我使用的代码:排序和过滤数据
Ext.define('CustomApp', {
extend: 'Rally.app.App',
componentCls: 'app',
grid: null,
launch: function() {
var filters = [];
var timeboxScope = this.getContext().getTimeboxScope();
if(timeboxScope) {
filters.push(timeboxScope.getQueryFilter());
}
this.getFilteredStoryModel(filters);
},
onTimeboxScopeChange: function(newTimeboxScope) {
var newFilters = [];
var updatedTimeboxScope = this.getContext().getTimeboxScope();
if (this.grid) {
this.grid.destroy();
}
if (updatedTimeboxScope) {
newFilters.push(newTimeboxScope.getQueryFilter());
}
this.getFilteredStoryModel(newFilters);
},
getFilteredStoryModel:function(queryFilters){
Ext.create('Rally.data.wsapi.Store', {
fetch: ['FormattedID','Name','Owner','ScheduleState'],
model:"User Story",
filters: queryFilters,
autoLoad:true,
listeners:{
load:function(myStore,myData,success){
console.log("got data:",myStore,myData,success);
//the data is got and store in myStore if success. and the _loadTagSummary is called with the myStore pass into it
this.displaydata(myStore);
},
scope:this
},
});
},
displaydata:function(mystorystore){
this.grid = this.add({
xtype: 'rallygrid',
model: mystorystore,
columnCfgs: [
'FormattedID',
'Name',
'Owner'
],
storeConfig: {
filters: [
{
property: 'Name',
operator: '=',
value: 'From Mail'
}
]
}
});
}
});
感谢您的帮助
是否可以根据关键字进行过滤“从邮件中”的名字? – Jonathan
当然,这是什么_getFilters功能正在做什么。它包含Name = From Mail过滤器,然后包含一个时间框过滤器(如果可用)。你可以尝试更改为包含以及而非=接线员名精确匹配的... –
是运营商,我应该把什么?抱歉,很新的反弹 – Jonathan