rally - Calculating a Total for a Grid -
rally - Calculating a Total for a Grid -
i have grid of has actual time 1 of columns. how can add together rows total actual time similar way done on track team status page. edit:
i trying find sum using var sum = grid.getstore().sum('actuals');, when run it, error on console: uncaught referenceerror: grid not defined
i have tried using piece of code found online:
var tasks = []; var users = []; = if (data.length ===0) { this._creategrid(); //to refresh grid when no items in iteration } ext.array.each(this.tasks, function(task) { var owner = task.get('owner'); var total; ext.array.each(data, function(actual){ //some tasks have no owner. if status not checked uncaught typeerror: cannot read property '_refobjectname' of null if (owner && actual.get('user')._refobjectname === owner._refobjectname) { total = actual.get('actuals'); } }); var t = { formattedid: task.get('formattedid'), _ref: task.get("_ref"), name: task.get('name'), estimate: task.get('actuals'), owner: (owner && owner._refobjectname) || 'none', taskestimates: total }; tasks.push(t); });
},
but when seek print total or taskestimate or effort find specific part of tasks (tasks[i][j]) either no info or error
see not-treegrid code in this post illustration of how create row in grid sums values in specific column (e.g. estimate)
columncfgs: [ { xtype: 'templatecolumn',text: 'id',dataindex: 'formattedid',width: 100, tpl: ext.create('rally.ui.renderer.template.formattedidtemplate'), summaryrenderer: function() { homecoming "estimate total"; } }, { text: 'estimate',dataindex: 'estimate', summarytype: 'sum', }
rally
Comments
Post a Comment