我正在尝试使用 Rally 2.0 API 和 WsapiDataStore 对象访问可用于迭代的“计划速度”字段。即使在开发中使用 fetch: true 来拉回所有字段,我也看不到这个字段。
有谁知道如何访问该字段?
谢谢,迈克尔
代码摘录:
Ext.define('CustomApp', {
extend: 'Rally.app.App',
componentCls: 'app',
launch: function() {
this.loadIterations();
},
loadIterations: function() {
var iterations = Ext.create('Rally.data.WsapiDataStore', {
model: 'Iteration',
autoLoad: true,
fetch: ['ObjectID', 'Name', 'EndDate', 'PlannedVelocity'],
sorters: [
{property: 'EndDate', direction: 'ASC'}
],
listeners: {
load: function(store, data, success) {
Ext.Array.each(data, function(record) {
console.info('ID: ', record.get('ObjectID'),
' Name: ', record.get('Name'),
' EndDate: ', record.get('EndDate'),
' PlannedVelocity: ', record.get('PlannedVelocity'));
});
}, scope: this
}
});
}
});
控制台输出:
ID: 12351801409 Name: AGR 4.2 Iteration 1 EndDate: Date {Tue Jul 02 2013 23:59:59 GMT-0400 (Eastern Standard Time)} PlannedVelocity: undefined ID: 12351802932 Name: AGR 4.2 Iteration 2 EndDate: Date {Tue Jul 23 2013 23:59:59 GMT-0400 (Eastern Standard Time)} PlannedVelocity: undefined ID: 13298563033 Name: AGR 4.2 Iteration 3 EndDate: Date {Tue Aug 13 2013 23:59:59 GMT-0400 (Eastern Standard Time)} PlannedVelocity: undefined ID: 12351804786 Name: AGR 4.2 Iteration 4 EndDate: Date {Tue Sep 03 2013 23:59:59 GMT-0400 (Eastern Standard Time)} PlannedVelocity: undefined
拉力赛信息:
Name End Date Planned Velocity AGR 4.2 Iteration 1 7/2/2013 29.0 Points AGR 4.2 Iteration 2 7/23/2013 82.0 Points AGR 4.2 Iteration 3 8/13/2013 70.5 Points AGR 4.2 Iteration 4 9/3/2013 72.4 Points