首页 > 解决方案 > Azure DevOps OAuth WorkItemSnapshot 查询 - 我可以进行日期算术吗?

问题描述

我正在对 WorkItemSnapshot 运行 OAuth 查询,我想在其中查询 Iteration/EndDate 和 Iteration/EndDate + 1 day之间的项目快照。

是否可以在这些类型的查询中进行日期算术?我在文档中找不到示例,但我肯定该功能必须存在!

https://analytics.dev.azure.com/MyOrg/MyProject/_odata/v3.0-preview/WorkItemSnapshot?
 $apply=filter(
 WorkItemType eq 'User Story'
 and startswith(Area/AreaPath,'MyProject')
 and DateValue gt Iteration/EndDate
 and DateValue lt DATEADD(day,1,Iteration/EndDate)
 and DateValue ge 2021-06-01Z
 )
 /groupby(
 (Iteration/IterationPath,Area/AreaPath,WorkItemType,State,DateValue),
 aggregate($count as Count, StoryPoints with sum as TotalStoryPoints)
 )

标签: azure-devopsdate-arithmetic

解决方案


推荐阅读