Skip to content

Commit

Permalink
copy of example
Browse files Browse the repository at this point in the history
  • Loading branch information
stefankendall2 committed Jun 6, 2014
1 parent 9ff2fb6 commit a49d05c
Showing 1 changed file with 52 additions and 4 deletions.
56 changes: 52 additions & 4 deletions js/App.js
Expand Up @@ -2,13 +2,61 @@ Ext.define('CustomApp', {
extend: 'Rally.app.App',
componentCls: 'app',
items: [
{
html: 'test'
}
],

launch: function() {

Ext.create('Rally.data.wsapi.Store', {
model: 'User',
autoLoad: true,
filters: [
{
property: 'TeamMemberships',
operator: 'contains',
value: Rally.util.Ref.getRelativeUri(this.getContext().getProject())
}
],
listeners: {
load: this._onTeamMembersLoaded,
scope: this
}
});
},

_onTeamMembersLoaded: function(store, records) {
var columns = [
{
value: null,
columnHeaderConfig: {
headerData: {owner: 'No Owner'}
}
}
];

_.each(records, function(record) {
columns.push({
value: record.getRef().getRelativeUri(),
columnHeaderConfig: {
headerData: {owner: record.get('_refObjectName')}
}
});
});

this._addBoard(columns);
},

_addBoard: function(columns) {
this.add({
xtype: 'rallycardboard',
types: ['User Story'],
attribute: 'Owner',
context: this.getContext(),
columnConfig: {
columnHeaderConfig: {
headerTpl: '{owner}'
}
},
columns: columns
});
}

});

0 comments on commit a49d05c

Please sign in to comment.