Search code examples
extjsextjs4rally

Want to display all portfolioitem/program in the rallycombobox, but it don't show


Want to display all portfolioitem/program in the rallycombobox, but it doesn't show up any

                this.down('#filter_box').add({
                    xtype: 'rallyfieldvaluecombobox',
                    model: 'portfolioitem/program',
                    field: 'Name',
                    //margin: '0 0 5 0',
                    autoLoad: true,
                    fieldLabel: 'Program',
                    itemId: 'program',
                    multiple: true,
                    stateful: true,
                    stateId: 'chart-state1',
                    stateEvents: ['change', 'select'],                      
                    displayField: 'Name',
                    valueField: 'FormattedID',
                    listeners:{
                        ready: function(combobox){
                            this.programs = this.down('#program').getValue();
                            //this.validateReady();                             
                        },
                        select: function(selectedRecord) {

Solution

  • rallyfieldvaluecombobox is for displaying allowed values of a field. Use rallycombobox if you want to populate a combobox with portfoilioitems:

    Ext.define('CustomApp', {
        extend: 'Rally.app.App',
        componentCls: 'app',
        items:{ html:'<a href="https://help.rallydev.com/apps/2.0/doc/">App SDK 2.0 Docs</a>'},
        launch: function() {
            this.add({
                xtype: 'rallycombobox',
                itemId: 'features',
            storeConfig: {
            model: 'PortfolioItem/Feature',
            fetch: ['FormattedID','Name','Release', 'UserStories'],
            limit: Infinity,
            autoLoad: true
            },
            fieldLabel: 'select Feature',
            listeners:{
                    ready: function(combobox){
                this._onFeatureSelected(combobox.getRecord());
    
            },
                    select: function(combobox){
                this._onFeatureSelected(combobox.getRecord());        
                    },
                    scope: this
                }
            });
        },
        _onFeatureSelected:function(record){
            console.log(record.get("Name"), record.get("FormattedID"));
        }
    });
    

    enter image description here