I’m playing with the sdk 2.0. I downloaded the examples, in particular I am referring to the “Grid” example. I want to only show results based on a certain workspace (or project…I can’t get either to work.)
This is my entire app. I’m trying to set the context on the storeConfig as below. It doesn’t work. Is my syntax wrong? Or am I fundamentally misunderstanding the purpose of this config setting?
Ext.define('CustomApp', {
extend: 'Rally.app.App',
componentCls: 'app',
launch: function() {
Rally.data.ModelFactory.getModel({
type: 'UserStory',
success: function(model) {
this.grid = this.add({
xtype: 'rallygrid',
model: model,
columnCfgs: [
'ScheduleState',
'FormattedID',
'Name',
'Owner',
'Project',
'Workspace'
],
storeConfig: {
context: {
workspace: 'Test'
},
filters: [
{
property: 'ScheduleState',
operator: '=',
value: 'Defined'
}
]
}
});
},
scope: this
});
}
});
You’ve got it right, but the value needs to be the ref of the workspace, not the name:
From inside an app the current context is always available via an accessor and can easily be passed into storeConfigs and other component configs like so: