rally - AppSDK2 Stories By Iteration App not Displaying All Stories in the Iteration -


i wrote app builds grid of user stories filtered iteration. seems work, , there no errors list of stories incomplete. iterations have half of stories missing in grid. stories in same project. doing wrong? if have suggestions on how improve code below please let me know. thanks!

<!doctype html>     <html>         <head>             <title>storiesbyiteration</title>             <script type="text/javascript" src="/apps/2.0rc1/sdk.js"></script>             <script type="text/javascript">                 rally.onready(function () {                     ext.define('customapp', {                         extend: 'rally.app.timeboxscopedapp',                         componentcls: 'app',                         scopetype: 'iteration',                         comboboxconfig: {                             labelwidth: 100,                             width: 300                         },                          addcontent: function() {                             this._makestore();                         },                          onscopechange: function() {                             this._makestore();                         },                           _makestore: function(){                              ext.create('rally.data.wsapidatastore', {                                 model: 'userstory',                                 fetch: ['formattedid','name'],                                 autoload: true,                                 filters: [this.getcontext().gettimeboxscope().getqueryfilter()],                                 listeners: {                                     load: this._ondataloaded,                                     scope:                                 }                             });                          },                          _ondataloaded: function(store, data){                             var stories = [];                             ext.array.each(data, function(story) {                                 var s  = {                                     formattedid: story.get('formattedid'),                                     name: story.get('name'),                                 };                                 this._creategrid(stories);                                 stories.push(s);                             }, this);                         },                                       _creategrid: function(stories) {                             var mystore = ext.create('rally.data.custom.store', {                                 data: stories,                                 pagesize: 100,                               });                              if (!this.grid) {                                 this.grid = this.add({                                     xtype: 'rallygrid',                                     store: mystore,                                     columncfgs: [                                         {                                            text: 'formatted id', dataindex: 'formattedid', xtype: 'templatecolumn',                                             tpl: ext.create('rally.ui.renderer.template.formattedidtemplate')                                         },                                         {                                             text: 'name', dataindex: 'name'                                         }                                     ]                                 });                             } else {                             this.grid.reconfigure(mystore);                             }                         }                     });                      rally.launchapp('customapp', {                         name:"storiesbyiteration",                     });                 });             </script>             <style type="text/css">                 .app { }             </style>         </head>     <body></body> </html> 

you need move

this._creategrid(stories); 

outside of loop:

 _ondataloaded: function(store, data){                 var stories = [];                 ext.array.each(data, function(story) {                             var s  = {                                 formattedid: story.get('formattedid'),                                 name: story.get('name'),                             };                             stories.push(s);                 }, this);                 this._creategrid(stories);     },     

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -