Hi ,
I am creating custom using below code and wanted to check the option to pass context using the code.
Irrespective of what i pass, the code is fetching data from a default workspace (i don't know how it is picking that particular workspace) and sample project under it. not sure what am missing
Ext.define('CustomApp', {
extend: 'Rally.app.App',
componentCls: 'app',
launch: function() {
//Write app code here
console.log('My 3rd App');
//API Docs:
https://help.rallydev.com/apps/2.1/doc/ //this._loadData();
this._loadIterations();
},
_loadIterations: function(){
this.iterComboBox= Ext.create('Rally.ui.combobox.IterationComboBox', {
listeners: {
ready: function(combobox){
this._loadData();
console.log('ready',combobox);
},
select: function(combobox,records){
this._loadData();
},
scope: this
}
});
this.add(this.iterComboBox);
},
_loadData: function(){
var selectedIterRef= this.iterComboBox.getRecord().get('_ref');
console.log('selected iter:',selectedIterRef);
var myStore = Ext.create('Rally.data.wsapi.Store', {
model: 'Defect',
context: {
workspace : '/workspace/1234',
//project: 'project/1234',
projectScopeDown: true
},
Filters: [
{Property: 'Iteration',
Operation: '=',
Value: selectedIterRef
}
],
autoLoad: true,
listeners: {
load: function(myStore, myData, success) {
//process data
console.log('Got data',myStore,myData,success);
this._loadGrid(myStore);
},
scope: this
},
fetch: ['FormattedID','Name', 'Iteration','Severity']
});
},
_loadGrid: function(myStoryStore){
var myGrid = Ext.create(Rally.ui.grid.Grid,
{
store: myStoryStore,
columnCfgs: [
'FormattedID','Name','Iteration','Severity' ]
}) ;
console.log('my grid',myGrid);
this.add(myGrid);
console.log('what is this?' , this);
}
});