如何确定某个州在某个州停留的时间?这是我用于提取用户故事细节的查询,但我试图了解如何在完成之前获得在进度中花费的持续时间。更具体地说,定制周期时间
https://rally1.rallydev.com/analytics/v2.0/service/rally/workspace/xxxx/artifact/snapshot/query.js?find= { “FormattedID”: “US41”, “_ PreviousValues.ScheduleState”: “处理中”}&安培;字段= [ “ScheduleState”, “_ ValidFrom”, “_ ValidTo”, “_ PreviousValues”] & hydrate = [“ScheduleState”,“_ ValidFrom”,“_ ValidTo”,“_ PreviousValues”]& sort = {_ ValidFrom:-1}& pagesize = 1
我没有看到ValidFrom和ValidTo提供该信息的位置。
答案 0 :(得分:1)
这个解决方案似乎对我有用。希望它有所帮助!
Ext.define('CustomApp', {
extend: 'Rally.app.App',
componentCls: 'app',
launch: function() {
Ext.create('Rally.data.lookback.SnapshotStore', {
fetch : ['ScheduleState'],
hydrate : ['ScheduleState'],
filters : [{
property : '_UnformattedID',
value : 41
}],
sorters : [{
property : '_ValidTo',
direction : 'ASC'
}]
}).load({
params : {
compress : true,
removeUnauthorizedSnapshots : true
},
callback : function(records, operation, success) {
var cycleTime = Rally.util.DateTime.getDifference(new Date(Rally.util.Array.last(Ext.Array.filter(records, function(record) {
return record.get('ScheduleState') === 'Accepted';
})).get('_ValidFrom')), new Date(Rally.util.Array.last(Ext.Array.filter(records, function(record) {
return record.get('ScheduleState') === 'In-Progress';
})).get('_ValidFrom')), 'day'));
}
});
}
});