1
我有兩個工作區 當我在一個工作區加載我的應用程序時,它與過濾器一起工作,但是當我使用相同的代碼時它不起作用。 然後我嘗試評論過濾器,然後它給了我整個記錄。不能圖什麼區別, 我使用拉力sdk2.0rc3
下面 是我的代碼片段過濾器無法在特定的工作區拉力賽
this._startDate
值2014-09-10
this._endDate
值2015-03-03
,當我打印操作它提供虛假
and iterations = []
@nickm幫我
_onDataLoaded: function() {
console.log("this.getContext().getProject()._ref", this.getContext().getProject()._ref);
console.log("this._startDate", this._startDate);
console.log("this._endDate", this._endDate);
var project_oid = this.getContext().getProject()._ref;
var startDateFilter = Ext.create('Rally.data.QueryFilter', {
property: 'StartDate',
operator: '>',
value: this._startDate
});
startDateFilter = startDateFilter.and({
property: 'StartDate',
operator: '<',
value: this._endDate
});
startDateFilter = startDateFilter.and({
property: 'StartDate',
operator: '!=',
value: null
});
var endDateFilter = Ext.create('Rally.data.QueryFilter', {
property: 'EndDate',
operator: '<',
value: this._endDate
});
endDateFilter = endDateFilter.and({
property: 'EndDate',
operator: '>',
value: this._startDate
});
endDateFilter = endDateFilter.and({
property: 'EndDate',
operator: '!=',
value: null
});
var filter = startDateFilter.or(endDateFilter);
//filter.toString();
Ext.create('Rally.data.WsapiDataStore', {
model: 'Iteration',
limit: Infinity,
context: {
project: project_oid,
projectScopeDown: true,
projectScopeUp: false
},
fetch: ['Name','Project', 'StartDate', 'EndDate', 'Parent', 'Children'],
autoLoad: true,
filters: [
filter
],
listeners: {
load: this._loadGrid,
scope:this
}
}, this);
},
_loadGrid: function(store, iterations, operation) {
console.log("hi there", operation);
感謝尼克,是的,我在我的日期使用了這個'toISOString()',它工作。非常感謝 – Sontya 2015-02-09 07:04:26