想要显示缺点/故事比率,希望获得冲刺的新缺陷

时间:2015-03-03 13:18:43

标签: rally

我已经构建了一个应用程序,根据选定的版本为每个团队显示两件事。

  1. 返工 - sprint n中已完成的故事n / sprint n中已完成的故事
  2. 缺陷/故事 - sprint中的新缺陷n / sprint n-1中的已完成故事
  3. enter image description here

    但是我无法得到sprint n 中的新缺陷, 我希望累积激活计数如缺陷趋势图中所示,我可以从报告中访问。

    对我而言,这是一个新的缺陷数。

    以下是我的代码,我正在考虑!ACCEPTED 的缺陷是新缺陷,但它不对。

    对此有任何帮助或建议,拉力如何显示缺陷趋势图中显示的累积激活计数?

                _fetchByArrayOfValues:function(oids,field_name){
                    var filters = null;
                    //this.logger.log("_fetchByArrayOfValues (", model_name, ",", oids.length, ",", field_name ,")");
                    var deferred = Ext.create('Deft.Deferred');
                    filters = Ext.create('Rally.data.QueryFilter',{
                        property:field_name,
                        operator: '=',
                        value:oids[0]
                    });         
                    for ( var i=1;i<oids.length;i++ ) {
                        filters = filters.or(Ext.create('Rally.data.QueryFilter',{
                            property:field_name,
                            value:oids[i]
                        }));
                    }
                    this.flows_by_iteration_id = {}; // key is iteration_id
                    this.iterations = {}; // key is iteration_id
                    this.iterations_defined = false;
                    //this.old_iterations = {};
                    this.addIterations();
                    var created = Ext.create('Rally.data.wsapi.artifact.Store', {
                        autoLoad: true,
                        models: ['UserStory','Defect'],
                        context: {
                            project: this.getContext().getProject()._ref,
                            projectScopeDown: true,
                            projectScopeUp: false
                        },                          
                        filters: filters,
                        limit: Infinity,
                        fetch: ['Name','Iteration','ScheduleState', 'InProgressDate', 'LastUpdateDate'],
                        listeners: {
                            load: function(store, records) {
                                var defectHash = {};
                                var storyHash = {};
                                Ext.Array.each(records, function(item){ 
                                    var itData = this.iterations[item.data.Iteration._ref];
                                    //var id = this.iterations[item.data.Iteration._ref]
                                    if ( ! defectHash[itData.Ref] ) { defectHash[itData.Ref] = { "NewCount": 0, "CompletedCount":0}; }
                                    if ( ! storyHash[itData.Ref] ) { storyHash[itData.Ref] = { "Count": 0}; }                               
                                    if(item.data._type == "defect" && itData.Ref == item.data.Iteration._ref && itData.Name == item.data.Iteration.Name) {
                                        if (item.data.ScheduleState != "Accepted") {
                                            defectHash[itData.Ref].NewCount += 1;
                                        } else if (item.data.ScheduleState == "Accepted") {
                                            defectHash[itData.Ref].CompletedCount += 1;
                                        }
                                        //+= value.Accept;
                                    } else if (item.data._type == "hierarchicalrequirement" && item.data.ScheduleState == "Accepted" && itData.Ref == item.data.Iteration._ref && itData.Name == item.data.Iteration.Name) {
                                        storyHash[itData.Ref].Count += 1;
                                    }
                                }, this);
                                this.commit_data_set = [defectHash, storyHash];
                                deferred.resolve(created);
                            },  
                            scope: this
                        }
                    }, this);
                    return deferred.promise;
                },  
    

0 个答案:

没有答案