1

フィールドが Rally で「非表示」になっている場合、それらは SDK の UI コンポーネントのいずれにも表示されません。たとえば、非表示フィールドであるためrallygrid、dataIndex の列で を作成することはできません。非表示のカスタム フィールドもありますが、それらを使用して._ref_refrallygrid

SDK のソースを調べたところ、これらが SDK の UI コンポーネントから削除されていることがわかったので、この問題を回避するための回避策またはハックを探していると思います。

私はこの問題についてここにコメントしました

4

1 に答える 1

1

カスタム ストアに基づくグリッドに _ref を含めることができます。カスタム データ グリッドのを変更して、各レコードの _ref 値を参照列に入力しました。

ここに画像の説明を入力

Ext.define('CustomApp', {
    extend: 'Rally.app.App',
    componentCls: 'app',
    items:{ html:'<a href="https://help.rallydev.com/apps/2.0rc3/doc/">App SDK 2.0rc3 Docs</a>'},
    launch: function() {
        Ext.create('Rally.data.wsapi.Store', {
            model: 'userstory',
            autoLoad: true,
            listeners:{
                load: this._onDataLoaded,
                scope: this
            },
            fetch: ['FormattedID', 'Name', '_ref']
        })
    },
    _onDataLoaded: function(store,data){
        var records = _.map(data, function(record){
            return Ext.apply({
                Ref: record.get('_ref')
            }, record.getData());
        });
        this.add({
            xtype: 'rallygrid',
            showPagingToolbar: false,
            showRowActionsColumn: false,
            editable: false,
            store: Ext.create('Rally.data.custom.Store', {
                data: records
            }),
            columnCfgs:[
                {
                    xtype: 'templatecolumn',
                    text: 'ID',
                    dataIndex: 'FormattedID',
                    width: 100,
                    tpl: Ext.create('Rally.ui.renderer.template.FormattedIDTemplate')
                },
                {
                    text: 'Name',
                    dataIndex: 'Name'
                },
                {
                    text: 'Reference',
                    dataIndex: 'Ref',
                    flex: 1
                }
            ]
        })
    }
});
于 2014-07-20T21:30:42.547 に答える