有没有一种方法可以使用LookbackAPI来查询从某个日期(比如一周前)到今天对PlanEstimate进行更改的所有故事(HierarchicalRequirement)?
或者,最好的方法是查找过去给定日期的所有故事,并返回PlanEstimate和UnformatedID字段,然后将它们与截至今天的每个故事的当前PlanEstimate进行比较?
发布于 2013-05-10 08:53:56
每个LBAPI快照都有一个_PreviousValues集合。对于每个LBAPI快照,如果一个字段与之前的快照相比发生了变化,那么_PreviousValues集合将针对该值进行水合。换言之,如果快照之间的PlanEstimate没有更改,则在_PreviousValues集合中将不会有该快照的PlanEstimate条目。因此,对于PlanEstimate,使用以下查询:
find: {
"_TypeHierarchy" : "HierarchicalRequirement",
"_PreviousValues.PlanEstimate" : {$exists: true},
"_ValidFrom": {
$gte: "2013-01-01T00:00:00.000Z",
$lt: "2013-05-01T00:00:00.000Z"
}
}应为您提供与从2013-05-01到2013-05-10的PlanEstimate更改相对应的任何HierarchicalRequirement快照。
https://stackoverflow.com/questions/16472522
复制相似问题