1
フィルタで反復を選択し、反復に基づいてデータをロードしようとしましたが、反復に基づいてデータを取得できませんでしたが、何も表示されませんでした。私が使用したコードデータが反復でロードされない
Ext.define('CustomApp', {
extend: 'Rally.app.App',
componentCls: 'app',
launch: function() {
var filters = [];
var timeboxScope = this.getContext().getTimeboxScope();
if(timeboxScope) {
filters.push(timeboxScope.getQueryFilter());
}
this.loaddata(filters);
},
onTimeboxScopeChange: function(newTimeboxScope) {
var newFilters = [];
var updatedTimeboxScope = this.getContext().getTimeboxScope();
if (this.grid) {
this.grid.destroy();
}
if (updatedTimeboxScope) {
newFilters.push(newTimeboxScope.getQueryFilter());
}
this.loaddata(newFilters);
},
loaddata: function(queryFilters) {
Ext.create("Rally.data.wsapi.Store",{
model: 'UserStory', //or defectModel
fetch: ['Tags'],
StoreConfig:{
filters: queryFilters
},
autoLoad: true,
listeners: {
load: function(Store, records) {
this._loadprocessdata(records);
},
scope: this
}
}); }、
_loadprocessdata: function(gathered){
var tags=[];
tags=gathered;
var i=0;
var interrupt=0;
var other=0;
var total=0;
var percentage=0;
for(i=0;i<tags.length;i++)
{
if(tags[i]==="Interrupt"){
interrupt++;
}
else{
other++;
}
}
total = other + interrupt;
percentage = (interrupt/total)*100;
var TagSummaryStore = Ext.create("Ext.data.Store",{
fields:['tagName', 'other', 'total', 'percentage'],
proxy: {
type: 'memory',
reader: {
type: 'json',
root: 'items'
}
}
});
TagSummaryStore.add({
'tagName' : tags.length,
'others' : other,
'Total' : tags.length,
'Percentage' : percentage.toFixed()
});
//Counting Tags and Visualize by Table
var myGrid=Ext.create("Ext.grid.Panel",{
title: 'Tag Summary',
store: TagSummaryStore,
columns: [
{ text: 'Tag', dataIndex: 'tagName' },
{ text: 'Stories', dataIndex: 'other' },
{ text: 'Points', dataIndex: 'Total' },
{ text: '%', dataIndex: 'Percentage' }
],
renderTo: Ext.getBody()
}
);
this.add(myGrid);
},
});
大変ありがとうございます!!!! – Jonathan