3
사용자 스토리 및 결함에서 결합 된 레코드 세트를 가져 오려고합니다. 각 작업 (예 : 결함 상태! = 폐쇄 및 사용자 스토리 직접 하위 개수 = 0)에 대한 필터가 있지만 결합 된 쿼리 또는 작동 할 사용자 정의 쿼리를 가질 수 없습니다. 예를 들어, 다음 코드는 User Stories를 반환하지만 모든 결함을 본질적으로 걸러냅니다.Rally SDK 2.0 - 다중 유형 아티팩트 필터링
이렇게하는 방법은 여러 가지가 있지만 각 유형별 필터를 사용하여 여러 유형의 조합 된 결과 집합을 얻는 방법은 확실합니까? 감사.
_getData: function(name) {
var deferred = Ext.create('Deft.Deferred');
Ext.create('Rally.data.wsapi.artifact.Store', {
models: ['UserStory', 'Defect'],
pageSize: 2000,
fetch: ['c_MyCustomField', 'ScheduleState', 'PlanEstimate', 'Name'],
filters: [
{ property: 'ScheduleState', operator: '!=', value: 'Accepted' },
function(item){
var dirChildCountIsGood = false;
try
{
if (item.DirectChildrenCount > 0)
dirChildCountIsGood = false;
}
catch(ex) {}
return false;
},
/* or */{ property: 'DirectChildrenCount', operator: '=', value: '0' }
//{ property: 'State', operator: '!=', value: 'Closed' }
],
sorters: [
{ property: 'c_MyCustomField', direction: 'ASC'} // Same field for both User Stories and Defects
],
autoLoad: true,
listeners: {
scope: this,
load: this._onRecordsLoaded
}
});
console.log('Call to WSAPI store complete.');
return deferred;
}