API 2.0 RC1。我可以调用回溯快照存储来返回我想要的记录,但是我无法让计算器正常工作。Lumenize 函数未定义:TypeError: Rally.data.lookback.Lumenize 未定义
我运行查询,按预期工作。但是,我如何“流明”,即整合到一天的粒度,并生成正确的汇总输出?下面的不行,所有的例子都是pre-2.0RC1。
//works to get the raw data
Ext.create('Rally.data.lookback.SnapshotStore', {
filters: [
{
property: '_TypeHierarchy',
operator: 'in',
value: ['Defect', 'HierarchicalRequirement']
},
{
property: 'Iteration',
operator: 'in',
value: iteration
},
{
property: '_ValidFrom',
operator: '>=',
value: this.startDate
}
],
autoLoad: true,
fetch: ['Name','FormattedID','ScheduleState','PlanEstimate','Iteration','Release','Project'],
listeners: {
load: {
fn: this._onDataLoaded,
scope: this
}
}
});
//Lumenize not working
_onDataLoaded: function(store, data) {
var config = {
startOn: this.startDate,
endBefore: this.endDate,
tz: 'America/Denver',
workDays:'Monday,Tuesday,Wednesday,Thursday,Friday',
granularity: 'day',
metrics: {"field": "PlanEstimate"},
summaryMetricsConfig: [
{
"field": "PlanEstimate",
"as": "Planned",
"display": "line",
"f": "sum"
},
{
"field": "PlanEstimate",
"as": "Completed",
"f": "filteredSum",
"filterField": "ScheduleState",
"filterValues": "Accepted",
"display": "column"
}
]
};
var calculator = new Rally.data.lookback.Lumenize.TimeSeriesCalculator(config);
var myData = calculator.prepareChartData(store);
var mySummary = calculator.getResults();
}