appsdk2 - the experimental hierarchical tree for rally -


i see hierarchical trees labeled experimental on rally site (https://help.rallydev.com/apps/2.0rc3/doc/#!/api/rally.ui.grid.treegrid). wanted build app using hierarchical tree , had few questions features. possible filter tree or no? can add totals of tasks given userstory (estimate, todo, actual, etc) , list total userstory value? there way list of userstories tasks in list beneath it?

a not-treegrid example: app uses group , summary features in grid of tasks in current iteration grouped workproduct (user story), estimate values of individual tasks summed up. full code in this github repo.

launch: function() {         var = this;         var today = new date().toisostring();         var stories = ext.create('rally.data.wsapi.store', {             model: 'userstory',             fetch: ['tasks'],             filters: [                 {                     property: 'iteration.startdate',                     operator: '<=',                     value: today                 },                 {                     property: 'iteration.enddate',                     operator: '>=',                     value: today                 }             ]         });         stories.load().then({             success: this.loadtasks,             scope:         }).then({             success:function(results) {                 that.makegrid(results);             },             failure: function(){                 console.log("oh noes!")             }         });     },      loadtasks: function(stories){         console.log("load tasks",stories)         var promises = [];         _.each(stories, function(story){             var tasks = story.get('tasks');             if (tasks.count > 0) {                 tasks.store = story.getcollection('tasks',{fetch:['name','formattedid','estimate','state','blocked','workproduct']});                 promises.push(tasks.store.load());             }         });         return deft.promise.all(promises);     },       makegrid: function(results){         var tasks = _.flatten(results);         var data = [];         _.each(tasks, function(task){             data.push(task.data);         })          _.each(data, function(record){             record.story = record.workproduct.formattedid + " " + record.workproduct.name;;         })           this.add({             xtype: 'rallygrid',             showpagingtoolbar: true,             showrowactionscolumn: true,             editable: false,             store: ext.create('rally.data.custom.store', {                 data: data,                 groupfield: 'story',             }),             features: [{ftype:'groupingsummary'}],             columncfgs: [                 {                     xtype: 'templatecolumn',text: 'id',dataindex: 'formattedid',width: 100,                     tpl: ext.create('rally.ui.renderer.template.formattedidtemplate'),                     summaryrenderer: function() {                         return "estimate total";                      }                 },                 {                     text: 'name',dataindex: 'name',                 },                 {                     text: 'state',dataindex: 'state',xtype: 'templatecolumn',                         tpl: ext.create('rally.ui.renderer.template.schedulestatetemplate',                             {                                 states: ['defined', 'in-progress', 'completed'],                                 field: {                                     name: 'state'                                  }                         })                 },                 {                     text: 'estimate',dataindex: 'estimate',                     summarytype: 'sum',                 },                 {                     text: 'workproduct',dataindex: 'workproduct',                     renderer: function(val, meta, record) {                         return '<a href="https://rally1.rallydev.com/#/detail/userstory/' + record.get('workproduct').objectid + '" target="_blank">' + record.get('workproduct').formattedid + '</a>';                     }                 },             ]         });      } 

update: if want filter task store include filter here:

tasks.store = story.getcollection('tasks',{fetch:['name','formattedid','estimate','state','blocked','workproduct'],filters:{property: 'state',operator: '<',value: 'completed'}}); 

a treegrid example: rally.ui.grid.treegrid referred still work in progress. have not seen working example of story hierarchy using treegrid not mean it's impossible.

when tested story hierarchy, child stories did not appear under epic stories, story/task hierarchy worked. filtering worked too. here example:

ext.define('customapp', {     extend: 'rally.app.app',     componentcls: 'app',     launch:function(){         ext.create('rally.data.wsapi.treestorebuilder').build({             models: ['userstory'],              autoload: true,              filters:[                 {                     property: 'name',                     operator: 'contains',                     value: 'story'                 }              ],              enablehierarchy: true             }).then({              success: function(store) {                 var grid = ext.create('ext.container', {                     items: [{                         xtype: 'rallytreegrid',                         columncfgs: [                             'name',                             'owner'                         ],                         store: store                     }]                 });                 that.add(grid);              }         });     }  

the screenshot below shows tasks nested under child story expected,but child story not nested under parent. grid filtered name expected:

enter image description here


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -