Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Rally AppSDK2迭代故事App不显示迭代中的所有故事_Rally - Fatal编程技术网

Rally AppSDK2迭代故事App不显示迭代中的所有故事

Rally AppSDK2迭代故事App不显示迭代中的所有故事,rally,Rally,我编写了一个应用程序,它构建了一个通过迭代过滤的用户故事网格。它似乎有效,没有错误,但故事列表不完整。有些迭代在网格中缺少一半的故事。所有故事都在同一个项目中。我做错了什么?如果你有关于如何改进下面代码的建议,请让我知道。谢谢 <!DOCTYPE html> <html> <head> <title>StoriesByIteration</title> <sc

我编写了一个应用程序,它构建了一个通过迭代过滤的用户故事网格。它似乎有效,没有错误,但故事列表不完整。有些迭代在网格中缺少一半的故事。所有故事都在同一个项目中。我做错了什么?如果你有关于如何改进下面代码的建议,请让我知道。谢谢

<!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: this
                                }
                            }); 
                        },

                        _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>

故事迭代
Rally.onReady(函数(){
Ext.define('CustomApp'{
扩展:“Rally.app.TimeboxScopedApp”,
组件CLS:“应用程序”,
scopeType:'迭代',
comboboxConfig:{
标签宽度:100,
宽度:300
},
addContent:function(){
这个;
},
onScopeChange:function(){
这个;
},
_makeStore:function(){
Ext.create('Rally.data.WsapiDataStore'{
模型:“用户故事”,
获取:['FormattedID','Name'],
自动加载:对,
筛选器:[this.getContext().getTimeboxScope().getQueryFilter()],
听众:{
加载:这个。加载后,
范围:本
}
}); 
},
_onDataLoaded:函数(存储、数据){
var故事=[];
Ext.Array.each(数据、函数(故事){
变量s={
FormattedID:story.get('FormattedID'),
名称:story.get('Name'),
};
这个。_createGrid(故事);
故事。推送;
},这个);
},             
_createGrid:函数(故事){
var myStore=Ext.create('Rally.data.custom.Store'{
数据:故事,
页面大小:100,
});
如果(!this.grid){
this.grid=this.add({
xtype:“rallygrid”,
商店:myStore,
专栏CFGS:[
{
text:'Formatted ID',dataIndex:'FormattedID',xtype:'templatecolumn',
tpl:Ext.create('Rally.ui.renderer.template.FormattedIDTemplate')
},
{
文本:“名称”,数据索引:“名称”
}
]
});
}否则{
这个.grid.reconforme(myStore);
}
}
});
Rally.launchApp('CustomApp'{
名称:“StoriesByIteration”,
});
});
.app{}
您需要移动

this._createGrid(stories);
循环之外:

 _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);
    },