与负责的团队一起在 Azure DevOps 中获取工作项

问题描述 投票:0回答:1

我想获取 Azure DevOps Services 中的工作项目列表,其中有一列显示负责每个工作项目的团队。这似乎是不可能的事情!!我不介意使用任何可用的技术(REST、OData、查询……),但我找不到任何方法来做到这一点。

工作项有一个区域路径,并且它们被分配给团队,因此在 SQL 中,这就像表之间的简单联接,但对于 Azure DevOps 查询则不是这样。

有什么想法吗?

azure-devops
1个回答
0
投票

您可以使用 OData 查询,如下所示:

https://analytics.dev.azure.com/{OrganizationName}/{ProjectName}/_odata/v3.0-preview/WorkItems?$select=WorkItemId, WorkItemType, Title, State, TagNames&$expand=AssignedTo($select=UserEmail), Area($select=AreaPath), Iteration($select=IterationPath), Teams($select=TeamName)&$filter=({some filters})

例如,下面的示例是列出分配给指定区域路径的工作项,并显示工作项所属团队的名称。

https://analytics.dev.azure.com/{OrganizationName}/{ProjectName}/_odata/v3.0-preview/WorkItems?$select=WorkItemId, WorkItemType, Title, State, TagNames&$expand=AssignedTo($select=UserEmail), Area($select=AreaPath), Iteration($select=IterationPath), Teams($select=TeamName)&$filter=(Area/AreaPath eq 'PrimaryProj\Admin')

结果:

enter image description here

如果区域路径已分配给多个团队,则会列出该区域路径分配给的所有团队。

enter image description here


© www.soinside.com 2019 - 2024. All rights reserved.