<commit_before>(function() {
    var Ext = window.Ext4 || window.Ext;

    /**
     *
     */
    Ext.define('Rally.apps.kanban.Settings', {
        singleton: true,
        requires: [
            'Rally.apps.kanban.ColumnSettingsField',
            'Rally.apps.kanban.CardAgeSettingsField',
            'Rally.ui.combobox.FieldComboBox',
            'Rally.ui.picker.FieldPicker',
            'Rally.ui.CheckboxField',
            'Rally.ui.plugin.FieldValidationUi'
        ],

        getFields: function() {
            return [
                {
                    name: 'groupByField',
                    xtype: 'rallyfieldcombobox',
                    model: 'UserStory',
                    margin: '10px 0 0 0',
                    fieldLabel: 'Group By',
                    listeners: {
                        select: function(combo) {
                            this.fireEvent('fieldselected', combo.getRecord().get('fieldDefinition'));
                        },
                        ready: function(combo) {
                            combo.store.filterBy(function(record) {
                                var attr = record.get('fieldDefinition').attributeDefinition;
                                return attr && !attr.ReadOnly && attr.Constrained && attr.AttributeType !== 'OBJECT' && attr.AttributeType !== 'COLLECTION';
                            });
                            if (combo.getRecord()) {
                                this.fireEvent('fieldselected', combo.getRecord().get('fieldDefinition'));
                            }
                        }
                    },
                    bubbleEvents: ['fieldselected', 'fieldready']
                },
                {
                    name: 'columns',
                    readyEvent: 'ready',
                    fieldLabel: '',
                    margin: '5px 0 0 80px',
                    xtype: 'kanbancolumnsettingsfield',
                    handlesEvents: {
                        fieldselected: function(field) {
                            this.refreshWithNewField(field);
                        }
                    },
                    listeners: {
                        ready: function() {
                            this.fireEvent('columnsettingsready');
                        }
                    },
                    bubbleEvents: 'columnsettingsready'
                },
                {
                    name: 'cardFields',
                    readyEvent: 'ready',
                    fieldLabel: 'Card Fields',
                    xtype: 'rallyfieldpicker',
                    cls: 'card-fields',
                    modelTypes: ['userstory', 'defect'],
                    fieldBlackList: ['DefectStatus', 'TaskStatus'],
                    alwaysSelectedValues: ['FormattedID', 'Name', 'Owner'],
                    width: 300,
                    margin: '10px 0 255px 0',
                    storeConfig: {
                        autoLoad: false
                    },
                    listeners: {
                        selectionchange: function(picker) {
                            picker.validate();
                        }
                    },
                    handlesEvents: {
                        columnsettingsready: function() {
                            if (this.picker) {
                                this.alignPicker();
                            }
                        }
                    }
                },
                {
                    name: 'hideReleasedCards',
                    xtype: 'rallycheckboxfield',
                    fieldLabel: 'Options',
                    margin: '10 0 0 0',
                    boxLabel: 'Hide cards in last visible column if assigned to a release'
                },
                {
                    xtype: 'kanbancardagesettingsfield',
                    fieldLabel: '',
                    margin: '5 0 10 80',
                    mapsToMultiplePreferenceKeys: ['showCardAge', 'cardAgeThreshold']
                },
                {
                    name: 'pageSize',
                    xtype: 'rallynumberfield',
                    plugins: ['rallyfieldvalidationui'],
                    fieldLabel: 'Page Size',
                    allowDecimals: false,
                    minValue: 1,
                    maxValue: 100,
                    allowBlank: false,
                    validateOnChange: false,
                    validateOnBlur: false
                },
                {
                    type: 'query',
                    config: {
                        helpId: 194
                    }
                }
            ];
        }
    });
})();<commit_msg>S51040: Support saving global kanban settings<commit_after>(function() {
    var Ext = window.Ext4 || window.Ext;

    /**
     *
     */
    Ext.define('Rally.apps.kanban.Settings', {
        singleton: true,
        requires: [
            'Rally.apps.kanban.ColumnSettingsField',
            'Rally.apps.kanban.CardAgeSettingsField',
            'Rally.ui.combobox.FieldComboBox',
            'Rally.ui.picker.FieldPicker',
            'Rally.ui.CheckboxField',
            'Rally.ui.plugin.FieldValidationUi'
        ],

        getFields: function() {
            return [
                {
                    name: 'groupByField',
                    xtype: 'rallyfieldcombobox',
                    model: 'UserStory',
                    margin: '10px 0 0 0',
                    fieldLabel: 'Group By',
                    listeners: {
                        select: function(combo) {
                            this.fireEvent('fieldselected', combo.getRecord().get('fieldDefinition'));
                        },
                        ready: function(combo) {
                            combo.store.filterBy(function(record) {
                                var attr = record.get('fieldDefinition').attributeDefinition;
                                return attr && !attr.ReadOnly && attr.Constrained && attr.AttributeType !== 'OBJECT' && attr.AttributeType !== 'COLLECTION';
                            });
                            if (combo.getRecord()) {
                                this.fireEvent('fieldselected', combo.getRecord().get('fieldDefinition'));
                            }
                        }
                    },
                    bubbleEvents: ['fieldselected', 'fieldready']
                },
                {
                    name: 'columns',
                    readyEvent: 'ready',
                    fieldLabel: '',
                    margin: '5px 0 0 80px',
                    xtype: 'kanbancolumnsettingsfield',
                    handlesEvents: {
                        fieldselected: function(field) {
                            this.refreshWithNewField(field);
                        }
                    },
                    listeners: {
                        ready: function() {
                            this.fireEvent('columnsettingsready');
                        }
                    },
                    bubbleEvents: 'columnsettingsready'
                },
                {
                    name: 'cardFields',
                    readyEvent: 'ready',
                    fieldLabel: 'Card Fields',
                    xtype: 'rallyfieldpicker',
                    cls: 'card-fields',
                    modelTypes: ['userstory', 'defect'],
                    fieldBlackList: ['DefectStatus', 'TaskStatus'],
                    alwaysSelectedValues: ['FormattedID', 'Name', 'Owner'],
                    width: 300,
                    margin: '10px 0 255px 0',
                    storeConfig: {
                        autoLoad: false
                    },
                    listeners: {
                        selectionchange: function(picker) {
                            picker.validate();
                        }
                    },
                    handlesEvents: {
                        columnsettingsready: function() {
                            if (this.picker) {
                                this.alignPicker();
                            }
                        }
                    }
                },
                {
                    name: 'hideReleasedCards',
                    xtype: 'rallycheckboxfield',
                    fieldLabel: 'Options',
                    margin: '10 0 0 0',
                    boxLabel: 'Hide cards in last visible column if assigned to a release'
                },
                {
                    xtype: 'kanbancardagesettingsfield',
                    fieldLabel: '',
                    margin: '5 0 10 80',
                    mapsToMultiplePreferenceKeys: ['showCardAge', 'cardAgeThreshold']
                },
                {
                    name: 'pageSize',
                    xtype: 'rallynumberfield',
                    plugins: ['rallyfieldvalidationui'],
                    fieldLabel: 'Page Size',
                    allowDecimals: false,
                    minValue: 1,
                    maxValue: 100,
                    allowBlank: false,
                    validateOnChange: false,
                    validateOnBlur: false
                },
                {
                    type: 'query'
                }
            ];
        }
    });
})();
{'fraction_non_alphanumeric': 0.09395259857583164, 'fraction_numerical': 0.008502497608672548, 'mean_word_length': 0.8696602424001589, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6093985', 'n_tokens_mistral': 2205, 'n_tokens_neox': 1953, 'n_words': 364}