when a field is 'hidden' in Rally, they will not be shown in any of the SDK's UI components. for example, I cannot make a rallygrid
with a column with dataIndex of _ref
because _ref
is a hidden field. I also have custom fields that are hidden, but I really need to use them to make columns in the rallygrid
.
I have looked through the sdk source and know that these are removed from the SDK's ui components, so I guess I'm looking for a workaround, or a hack to get around this issue.
I commented on this issue here
It is possible to include _ref in a grid based on a custom store. I modified a custom data grid example to populate a Reference column with _ref values of each record:
Ext.define('CustomApp', {
extend: 'Rally.app.App',
componentCls: 'app',
items:{ html:'<a href="https://help.rallydev.com/apps/2.0rc3/doc/">App SDK 2.0rc3 Docs</a>'},
launch: function() {
Ext.create('Rally.data.wsapi.Store', {
model: 'userstory',
autoLoad: true,
listeners:{
load: this._onDataLoaded,
scope: this
},
fetch: ['FormattedID', 'Name', '_ref']
})
},
_onDataLoaded: function(store,data){
var records = _.map(data, function(record){
return Ext.apply({
Ref: record.get('_ref')
}, record.getData());
});
this.add({
xtype: 'rallygrid',
showPagingToolbar: false,
showRowActionsColumn: false,
editable: false,
store: Ext.create('Rally.data.custom.Store', {
data: records
}),
columnCfgs:[
{
xtype: 'templatecolumn',
text: 'ID',
dataIndex: 'FormattedID',
width: 100,
tpl: Ext.create('Rally.ui.renderer.template.FormattedIDTemplate')
},
{
text: 'Name',
dataIndex: 'Name'
},
{
text: 'Reference',
dataIndex: 'Ref',
flex: 1
}
]
})
}
});