我正在使用VersionOne Python SDK,并想知道Story何时进入某个项目(Scope)。我可以找回故事,但我如何获得历史记录?
v1 = V1Meta()
for story in v1.Story.where(Number="S-01211"):
print story.Scope.Name # prints current value
# but how to retrieve historical values?
答案 0 :(得分:1)
如果您想要查看过去的特定点,请使用“asof”修饰符。您必须在查询“select”中包含范围名称以获取历史值。
v1 = V1Meta()
past_date = '2012-11-01'
query = (v1.Story
.where(Number="S-01211")
.asof('2012-11-01')
.select('Number', 'Name', 'Owners.Name', 'Scope.Name')
)
for story in query:
print story.data['Scope.Name'] # prints current value