【发布时间】:2020-09-08 15:22:47
【问题描述】:
我有以下查询来在 Azure DevOps 中构建 Sprint Burndown 跨组织。它工作正常且流畅。
OData.Feed ("https://analytics.dev.azure.com/" & organization & "/" & projectName & "/_odata/v3.0-preview/WorkItemSnapshot?"
&"$apply=filter(WorkItemType eq 'User Story' and StateCategory ne 'Completed' and DateValue ge Iteration/StartDate and DateValue le Iteration/EndDate and Iteration/StartDate ge 2020-01-01Z)"
&"/groupby( "
&"(DateValue,State,WorkItemType,Area/AreaPath,Iteration/IterationPath,Iteration/StartDate,Iteration/EndDate), "
&"aggregate($count as Count, StoryPoints with sum as TotalStoryPoints) "
&") ",
[#"Authorization" = "Basic " & apiKey]
, [Implementation="2.0",OmitValues = ODataOmitValues.Nulls,ODataVersion = 4])
但是,我也想查询每个项目下的团队,但与迭代和区域相比,它不像在 groupby 部分中添加 Teams/TeamName 那样简单。
以下是我失败的尝试:
OData.Feed ("https://analytics.dev.azure.com/" & organization & "/" & projectName & "/_odata/v3.0-preview/WorkItemSnapshot?"
&"$apply=filter(WorkItemType eq 'User Story' and StateCategory ne 'Completed' and DateValue ge Iteration/StartDate and DateValue le Iteration/EndDate and Iteration/StartDate ge 2020-01-01Z)"
&"/groupby( "
&"(DateValue,State,WorkItemType,Teams/TeamName,Area/AreaPath,Iteration/IterationPath,Iteration/StartDate,Iteration/EndDate), "
&"aggregate($count as Count, StoryPoints with sum as TotalStoryPoints) "
&") ",
[#"Authorization" = "Basic " & apiKey]
, [Implementation="2.0",OmitValues = ODataOmitValues.Nulls,ODataVersion = 4])
【问题讨论】:
-
我尝试过使用
$expand,但加载速度很慢。
标签: azure-devops powerbi odata