这是由于 AppSDK2 中 Cardboard 的现有限制。
像下面这样的简单代码将构建一个基本的任务对象纸板,但它看起来不像旧版 TaskBoard 应用程序中的纸板。除了使用 cardConfig 的默认名称和所有者之外,还可以向卡片添加字段:
var myCardConfig = {
xtype: 'rallycard',
fields: ['ToDo', 'Estimate', 'WorkProduct'],
editable: true
}
但editable: true
只使名称可编辑。
可以在卡片上编辑的字段仍然非常有限。
也没有简单的方法可以在垂直泳道之外的任务卡左侧添加工作产品(用户故事)卡。
Ext.define('CustomApp', {
extend: 'Rally.app.TimeboxScopedApp',
componentCls: 'app',
scopeType: 'iteration',
onScopeChange: function(scope) {
this._iteration = scope.record.get('_ref');
var myCardConfig = {
xtype: 'rallycard',
fields: ['ToDo', 'Estimate', 'WorkProduct'],
editable: true
}
if(!this.board) {
this.board = this.add({
xtype: 'rallycardboard',
types: ['Task'],
attribute: 'State',
cardConfig: myCardConfig,
storeConfig: {
filters: [scope.getQueryFilter()]
}
});
} else {
this.board.refresh({
storeConfig: {
filters: [scope.getQueryFilter()]
}
});
}
this.iteration = scope.getRecord();
}
});