Created
August 7, 2013 16:17
-
-
Save sficarrotta/6175581 to your computer and use it in GitHub Desktop.
Code from "How to Create a Board App in Rally" blog post.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ext.define('CustomApp', { | |
extend: 'Rally.app.App', | |
componentCls: 'app', | |
launch: function() { | |
this.iterationCombobox = this.add({ | |
xtype: 'rallyiterationcombobox', | |
listeners: { | |
change: this._onIterationComboboxChanged, | |
ready: this._onIterationComboboxLoad, | |
scope: this | |
} | |
}); | |
}, | |
_onIterationComboboxLoad: function() { | |
var addNewConfig = { | |
xtype: 'rallyaddnew', | |
recordTypes: ['User Story', 'Defect'], | |
ignoredRequiredFields: ['Name', 'ScheduleState', 'Project'], | |
showAddWithDetails: false, | |
listeners: { | |
beforecreate: this._onBeforeCreate, | |
scope: this | |
} | |
}; | |
this.addNew = this.add(addNewConfig); | |
var cardBoardConfig = { | |
xtype: 'rallycardboard', | |
types: ['Defect', 'User Story'], | |
attribute: 'ScheduleState', | |
storeConfig: { | |
filters: [this.iterationCombobox.getQueryFromSelected()] | |
} | |
}; | |
this.cardBoard = this.add(cardBoardConfig); | |
}, | |
_onBeforeCreate: function(addNewComponent, record) { | |
record.set('Iteration', this.iterationCombobox.getValue()); | |
}, | |
_onIterationComboboxChanged: function() { | |
var config = { | |
storeConfig: { | |
filters: [this.iterationCombobox.getQueryFromSelected()] | |
} | |
}; | |
this.cardBoard.refresh(config); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment