Josh
Josh

Reputation: 2338

rally sdk2 cardboard limit columns showing

I want to limit what some users see in the kanban board. So devs to Accepted, BAs a ToDo and released. I tried this

            Ext.define('CustomApp', {
            extend: 'Rally.app.App',

            launch: function() {
                var cardBoardConfig = {
                    xtype: 'KanbanCardBoard',
                    cardConfig: { xtype: 'KanBanCard'},
                    types: ['User Story', 'Defect'],
                    attribute: "KanbanState",
                    storeConfig:{
                        filters: [{
                            property: 'KanbanState',
                            operator: '<',
                            value: 'Released'
                        }],
                    },
                    listeners: {
                        columnsretrieved: this._columnsretrieved,
                    }
                };

                this.add(cardBoardConfig);
            },
            _columnsretrieved: function(firstObj, retrievedColumns) { retrievedColumns = retrievedColumns.slice(2,8);} //remove first 2 and last one
        });

and then this

            Ext.define('Rally.ui.cardboard.KanbanCardBoard', {
            extend: 'Rally.ui.cardboard.CardBoard',
            alias: 'widget.KanbanCardBoard',
            _renderColumns: function() {
                    this.columnDefinitions.slice(2, 8); //remove first 2 and last one

                    if (this.columnDefinitions.length) {
                        this.add(this.columnDefinitions);
                        this.columnDefinitions[0].addCls("firstColumn");
                        this.columnDefinitions[this.columnDefinitions.length - 1].addCls("lastColumn");
                        this.showMask(this.maskMsg || 'Loading...');
                    }
            }
        });

but I can't limit the columns being displayed. All the columns are still showing even if i slice them away.

Upvotes: 1

Views: 144

Answers (1)

Kyle Morse
Kyle Morse

Reputation: 8410

The board also takes a columns config which allows you to specify the exact columns you'd like displayed. By default if no columns are specified it will just show one column for each value of the specified attribute.

Upvotes: 1

Related Questions