残念ながら、これはフィルターでは機能しません。
{
property: 'Iteration.EndDate',
operator: '<',
value: 'AcceptedDate'
}
代わりに、この条件を使用しました
Ext.Array.each(data, function(record) {
iteration = record.get('Iteration');
endDate = (iteration && iteration.EndDate) || 'None';
acceptedDate = record.get('AcceptedDate');
if (Rally.util.DateTime.fromIsoString(endDate) < acceptedDate) {
以下は、イテレーションの終了日後に受け入れられたストーリーのグリッドを構築する完全なアプリです。
<!DOCTYPE html>
<html>
<head>
<title>AcceptedAfterEndDate</title>
<script type="text/javascript" src="/apps/2.0rc1/sdk.js"></script>
<script type="text/javascript">
Rally.onReady(function () {
Ext.define('CustomApp', {
extend: 'Rally.app.App',
componentCls: 'app',
launch: function() {
Ext.create('Rally.data.WsapiDataStore', {
model: 'UserStory',
fetch:['Name','Iteration','AcceptedDate','ScheduleState','EndDate'],
autoLoad: true,
listeners: {
load: this._onDataLoaded,
scope: this
}
});
},
_onDataLoaded: function(store, data) {
var records = [];
var iteration;
var endDate;
var acceptedDate;
Ext.Array.each(data, function(record) {
iteration = record.get('Iteration');
endDate = (iteration && iteration.EndDate) || 'None';
acceptedDate = record.get('AcceptedDate');
if (Rally.util.DateTime.fromIsoString(endDate) < acceptedDate) {
records.push({
ScheduleState: record.get('ScheduleState'),
Name: record.get('Name'),
AcceptedDate: record.get('AcceptedDate'),
Iteration: (iteration && iteration.Name) || 'None',
EndDate: (iteration && iteration.EndDate) || 'None',
});
}
});
this.add({
xtype: 'rallygrid',
store: Ext.create('Rally.data.custom.Store', {
data: records,
filters:[
{property: 'ScheduleState',
operator: '=',
value: 'Accepted'}
]
}),
columnCfgs: [
{
text: 'Name', dataIndex: 'Name'
},
{
text: 'Schedule State', dataIndex: 'ScheduleState'
},
{
text: 'Iteration', dataIndex: 'Iteration'
},
{
text: 'Iteration End Date', dataIndex: 'EndDate'
},
{
text: 'Accepted Date', dataIndex: 'AcceptedDate'
}
]
});
}
});
Rally.launchApp('CustomApp', {
name:"AcceptedAfterEndDate",
//parentRepos:""
});
});
</script>
<style type="text/css">
.app {
/* Add app styles here */
}
</style>
</head>
<body></body>
</html>