如果您想按子項目對故事進行分組,您可以在商店配置中使用groupField: 'Project'
。這是定於父項目下通過相應的子項目進行分組的當前迭代的故事的一個例子:
Ext.define('CustomApp', {
extend: 'Rally.app.App',
componentCls: 'app',
launch: function() {
var today = new Date().toISOString();
this.add({
xtype: 'rallygrid',
columnCfgs: [
'FormattedID',
'Name',
'State',
'ToDo'
],
context: this.getContext(),
features: [{
ftype: 'groupingsummary',
groupHeaderTpl: '{name} ({rows.length})'
}],
storeConfig: {
model: 'UserStory',
groupField: 'Project',
groupDir: 'ASC',
fetch: ['Project'],
filters: [
{
property: 'Iteration.StartDate',
operator: '<=',
value: today
},
{
property: 'Iteration.EndDate',
operator: '>=',
value: today
}
],
getGroupString: function(record) {
var project = record.get('Project');
return project._refObjectName;
}
}
});
}
});
![enter image description here](https://i.stack.imgur.com/l7tVj.png)