我需要以下代码的帮助。未注释的代码工作正常,但我需要让注释的代码工作。请参阅下面的代码中的// value:releaseStartDateISO。具体来说,filter-2不起作用。我希望显示活动的缺陷(即过滤器1-未关闭)或缺陷的关闭日期大于释放开始日期(过滤器2)。这将为我提供所有活动缺陷以及当前冲刺期间关闭的任何缺陷。我尝试将发布开始日期转换为ISO,但这不起作用。似乎集会没有认识到ReleaseStartDate,我不知道为什么。注意:这是来自拉力赛的代码。我添加了“或过滤器”https://github.com/RallyApps/app-catalog/tree/master/src/apps/defectsummarymatrix 谢谢你的帮助!
_showComponentIfNeeded: function(component) {
if (component && component.isHidden()) {
component.show();
}
},
_initializeAllDefectStore: function(release) {
//var releaseStartDate = release.get('ReleaseStartDate');
//var releaseStartDateISO = Rally.util.DateTime.toIsoString(releaseStartDate,true);
var filter = Ext.create('Rally.data.QueryFilter', {
property: 'State',
operator: '!=',
value: 'Closed'
});
filter = filter.or({
property: 'ClosedDate',
operator: '>',
//value: releaseStartDateISO
value: '2014-09-10'
});
filter.toString();
if (this.releaseFilter && this.defectModel) {
this.allDefectStore = Ext.create('Rally.data.wsapi.Store', {
model: this.defectModel,
fetch: ['State','Priority'],
autoLoad: true,
limit: Infinity,
context: this.getContext().getDataContext(),
filters : [this.releaseFilter,filter],
listeners: {
load: this._onAllDefectStoreLoaded,
scope: this
}
});
}
},
_onAllDefectStoreLoaded: function(store, records, successful, eOpts) {
this._initializeMatrixTable();
this._populateMatrixTable(records);
this._createPriorityRecords(records);
this._updateMatrixGrid();
this.setLoading(false);
},
答案 0 :(得分:0)
release.get('ReleaseStartDate')的价值是多少?您的发布记录是否可能没有填充该字段?