我有Rally.ui.grid.Grid的功能,我想在Portfolio Item页面上添加过滤器以进行发布。我怎么能这样做? 这是我的网格。
this._myGrid = Ext.create('Rally.ui.grid.Grid', {
xtype: 'rallygrid',
title: 'Feature Scoring Grid',
store: myStore,
enableEditing: true,
enableRanking: true,
columnCfgs: [
{
dataIndex: 'DragAndDropRank',
maxWidth: 50
},
{ // override ID and Name - no changes on these allowed in this grid
text: 'Portfolio ID',
dataIndex: 'FormattedID',
flex: 1,
xtype: 'templatecolumn',
tpl: Ext.create('Rally.ui.renderer.template.FormattedIDTemplate') // make the ID a live link
},
{
text: "Name",
dataIndex: "Name",
flex: 2
},
{
text: "Release",
dataIndex: "Release",
flex: 3
},
"TimeValue", 'OERR', 'UserValue', 'jobSize', // use native Ext formatting - allows cell edits & got rid of errors
{ // override score so that the user can't edit it
text: "Score",
dataIndex: 'Score'
}
]
});
对于发布的排序并没有正常工作,我不明白如何解决它。 我没有找到任何关于发布过滤器何时正常运行功能的示例。
答案 0 :(得分:1)
您可能会在this github repo中看到按版本过滤的功能示例。
此应用扩展了Rally.app.TimeboxScopedApp
Ext.define('CustomApp', {
extend: 'Rally.app.TimeboxScopedApp',
componentCls: 'app',
scopeType: 'release',
comboboxConfig: {
fieldLabel: 'Select a Release:',
labelWidth: 100,
width: 300
},
并通过发布过滤了PI / Features的wsapi商店:
_makeStore: function(){
Ext.create('Rally.data.WsapiDataStore', {
model: 'PortfolioItem/Feature',
fetch: ['FormattedID','Name'],
pageSize: 100,
autoLoad: true,
filters: [this.getContext().getTimeboxScope().getQueryFilter()],
listeners: {
load: this._onDataLoaded,
scope: this
}
});
},