想要通过三个条件过滤缺陷 开放缺陷,缺陷发布开始日期和缺陷发布结束日期。 对于发布开始日期和发布结束日期,我从日期组合框中选择。
以下是我的代码
_prepareChart: function() {
that = this;
console.log("start date", that._startDate);
console.log("end date", that._endDate);
Ext.create('Rally.data.WsapiDataStore', {
model: 'Defect',
//fetch: ['Release'],
limit: Infinity,
field: 'State',
autoLoad: true,
storeConfig: {
filters: [
{
property: 'State',
operator: '=',
value: "Open"
},
{
property: 'Release.ReleaseStartDate',
operator: '=',
value: that._startDate
},
{
property: 'Release.ReleaseDate',
operator: '<=',
value: that._endDate
}
],
},
listeners: {
load: this._onDataLoaded,
//load: this._onDataLoadedfirst,
scope: this
}
});
},
以下是我选择日期的应用程序屏幕
答案 0 :(得分:0)
您可以使用toISOString
中的javascript this example方法var today = new Date().toISOString();
Ext.create('Rally.data.wsapi.artifact.Store', {
models: ['UserStory','Defect'],
fetch: ['Owner', 'FormattedID','Name','ScheduleState','Tasks'],
autoLoad: true,
filters : [
{
property: 'Iteration.StartDate',
operator: '<=',
value: today
},
{
property: 'Iteration.EndDate',
operator: '>=',
value: today
}
],
listeners: {
load: this._onDataLoaded,
scope: this
}
});
答案 1 :(得分:0)
谢谢你,对于答案,我也会尝试这个,并且我使用下面的代码。
已经修好了。
start_date = Rally.util.DateTime.format(new Date(that._startDate), 'Y-m-d');
end_date = Rally.util.DateTime.format(new Date(that._endDate), 'Y-m-d');
更改了集会所需的日期格式,谢谢