2013-08-01 36 views
0

我表示當紙板僅顯示功能在我的紙板特點父無問題:拉力看板卡顯示母公司的功能

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文檔中找到正確執行此操作的方法。

回答

0

下面是一個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); 
    } 
}); 
+0

你的解決方案是正確的。我已經將類型定義爲'['PortfolioItem']',但是當我將其更改爲'['PortfolioItem/Feature','PortfolioItem/Rollup']'時,它就起作用了! –