0
랠리 그리드와 연관된 데이터 저장소에 일부 계산 된 필터링을 적용해야합니다.랠리 그리드에 필터를 적용하는 방법
이 코드는 "노이즈"를 디버깅하는 데 좋은 비트가 있지만 구성 시간에 일부 필터를 제공하려고 시도하고 있으며 무시되거나 내 필터 기능이 실행되지 않는 것처럼 보입니다.
Ext.define('CustomApp', {
extend: 'Rally.app.App',
componentCls: 'app',
launch: function() {
//Write app code here
console.log("Overall App Launch function entered");
//API Docs: https://help.rallydev.com/apps/2.1/doc/
}
});
Rally.onReady(function() {
Ext.define('BOA.AdoptedWork.MultiArtifactGrid', {
extend: 'Rally.app.App',
componentCls: 'app',
launch: function() {
console.log("onReady Launch function entered");
this.theGrid = {
xtype: 'rallygrid',
showPagingToolbar: true,
showRowActionsColumn: false,
editable: false,
columnCfgs: [
'FormattedID',
'Name',
'ScheduleState',
'Iteration',
'Release',
'PlanEstimate',
'TaskEstimateTotal',
'TaskActualTotal', // For some reason this does not display ?? :o(??
'TaskRemainingTotal'
],
listeners: {
afterrender: {
fn: function (_myVar, eOpts) {
console.log("Arg to afterrender: ", _myVar, " and ", eOpts);
console.log("Filters: ", _myVar.filters);
var _myStore = _myVar.getStore();
console.log("Store : ", _myStore);
console.log("Store filters: ", _myStore.filters);
}
}
},
filters: [{
// This did not work ...
property: 'ScheduleState',
operator: '==',
value: 'Defined',
// Trying dynamic Filter Function. Update: Never called.
filterFn: function (item) {
console.log("Entered Filter Function!");
var iter = item.get("Iteration");
console.log("Iteration field: ", iter);
if (iter !== null && iter !== undefined) {
return (iter.name === "Sprint 3");
} else {
return false;
}
}
}],
context: this.getContext(),
storeConfig: {
models: ['userstory', 'defect']
},
scope: this
};
this.add(this.theGrid);
console.log("The Grid Object: ", this.theGrid);
}
});
Rally.launchApp('BOA.AdoptedWork.MultiArtifactGrid', {
name: 'Multi-type Grid'
});
});
JavaScript에서는 12 년 전에 결코 코딩하지 않았습니다. 그래서, 나는 내 태도를 얻고있다.
corkr03 말했다 ... 몇 가지 @miguelfuerte
: "검색"구성이 storeConfig의 일부가 될 필요가 랠리 사회에서
코드의 스크린 샷을 게시하지 마십시오. 문제를 재현하기 위해 필요한 부분을 복사하여이 문제를 해결할 수 있도록 도와주십시오. – LW001
감사합니다. 분명히, stackoverflow.com에 내 첫 게시물 : 스크린 샷은 모든 디버깅 소음과 함께 덜 혼잡했지만 어쩌면 내가 직접 알아낼려고 검사하는 몇 가지 볼 수 있습니다. 감사합니다. –