我要做的是设置一个自定义报告,将一组特定的用户故事导出到Excel,并添加一个下拉列表以按用户故事排序。
我在向网格添加列'Parent'
时遇到问题,认为这将是一项简单的任务,但我遇到了障碍。
任何帮助都会很棒! 谢谢!
Ext.define('CustomApp', {
extend: 'Rally.app.App',
componentCls: 'app',
launch: function() {
var filter = Ext.create('Rally.data.QueryFilter', {
property: 'c_Priority',
operator: '=',
value: '90 days'
});
filter = filter.or({
property: 'c_Priority',
operator: '=',
value: '60 days'
});
filter = filter.or({
property: 'c_Priority',
operator: '=',
value: '30 days'
});
filter = filter.or({
property: 'c_Priority',
operator: '=',
value: '120 days'
});
filter = filter.or({
property: 'c_Priority',
operator: '=',
value: '120+ days'
});
filter.toString();
Ext.create('Rally.data.wsapi.TreeStoreBuilder').build({
models: ['User Story'],
autoLoad: true,
enableHierarchy: true,
filters: filter,
}).then({
success: this._onStoreBuilt,
scope: this
});
},
_onStoreBuilt: function(store) {
var modelNames = ['User story'],
context = this.getContext();
this.add({
xtype: 'rallygridboard',
context: context,
modelNames: modelNames,
toggleState: 'grid',
stateful: false,
plugins: [
{
ptype: 'rallygridboardactionsmenu',
menuItems: [
{
text: 'Export...',
handler: function() {
window.location = Rally.ui.grid.GridCsvExport.buildCsvExportUrl(
this.down('rallygridboard').getGridOrBoard());
},
scope: this
}
],
buttonConfig: {
iconCls: 'icon-export'
}
}
],
gridConfig: {
store: store,
columnCfgs: [
'Name',
'ScheduleState',
'PlanEstimate',
'c_Priority',
'Owner',
'Parent'
]
},
height: this.getHeight()
});
console.log(store);
}
});