Rally 拉力看板卡显示家长的功能
当硬纸板仅显示特征时,我在硬纸板中显示特征的父对象没有问题:Rally 拉力看板卡显示家长的功能,rally,Rally,当硬纸板仅显示特征时,我在硬纸板中显示特征的父对象没有问题: cardConfig: { xtype: 'rallycard', listeners: { fieldclick : function(field, card) { _loadDetails(card); } }, fields: [ 'Name', // 'Parent' - either one of the
cardConfig: {
xtype: 'rallycard',
listeners: {
fieldclick : function(field, card) {
_loadDetails(card);
}
},
fields: [
'Name',
// 'Parent' - either one of these ways works
{
name: 'Parent',
fetch: ['Parent'],
renderTpl: Ext.create('Ext.XTemplate', 'Parent: {Parent.Name}')
}
]
},
但是,当看板同时显示功能和汇总时,卡上不会显示父信息。我尝试过有条件地设置它,或者使用渲染器而不是renderTpl(从未调用渲染器)-我在API文档中找不到正确的方法。以下是一个App.js代码,其中主题卡不显示父字段,但功能卡和倡议卡显示:
Ext.define('CustomApp', { extend: 'Rally.app.App', componentCls: 'app',
launch: function() {
var addNewConfig = {
xtype: 'rallyaddnew',
recordTypes: ['PortfolioItem/Feature', 'PortfolioItem/Initiative', 'PortfolioItem/Theme'],
ignoredRequiredFields: ['Name', 'Project'],
showAddWithDetails: false,
};
this.addNew = this.add(addNewConfig);
var myCardConfig = {
xtype: 'rallycard',
fields: ['State','Parent']
}
var cardBoardConfig = {
xtype: 'rallycardboard',
types: ['PortfolioItem/Feature', 'PortfolioItem/Initiative', 'PortfolioItem/Theme'],
attribute: 'InvestmentCategory',
cardConfig: myCardConfig
};
this.cardBoard = this.add(cardBoardConfig);
}
});
你的解决方案是正确的。我已经将类型定义为
['PortfolioItem']
,但当我将其更改为['PortfolioItem/Feature','PortfolioItem/Rollup']
时,它就工作了!