简体   繁体   English

使用 oData 从 Azure 到 select Dev Ops Project all open tickets and their children

[英]Using oData to select from Azure Dev Ops Project all open tickets and their children

I am a novice:-)我是新手:-)

I have an ado project where the ticket hierarchy is "EPIC - Feature - User Story - Bugs or Tasks - Tasks so up to 5 levels.我有一个 ado 项目,其中票证层次结构是“EPIC - 功能 - 用户故事 - 错误或任务 - 任务,最多 5 个级别。

I want to be able to pull into Power BI using OData all workitems from ADO where the EPIC is not closed (or has closed this financial year - closed date of 21020701).我希望能够使用 OData 将 EPIC 未关闭(或已关闭本财政年度 - 关闭日期为 21020701)的 ADO 中的所有工作项拉入 Power BI。

https://analytics.dev.azure.com/{organisation}/{project}/_odata/v3.0-preview/WorkItems ? https://analytics.dev.azure.com/{organisation}/{project}/_odata/v3.0-preview/WorkItems $select=WorkItemId,WorkItemType,Title,State,Closeddate,targetdate,closeddateSk &$filter=WorkItemType eq 'Epic' and state eq 'Closed' and closeddateSk ge 20210701 or state ne 'Closed' and WorkItemtype eq 'Epic' &startswith(Area/AreaPath,'{project}') &$orderby=WorkItemId desc $select=WorkItemId,WorkItemType,Title,State,Closeddate,targetdate,closeddateSk &$filter=WorkItemType eq 'Epic' 和 state eq 'Closed' and closeddateSk ge 20210701 or state ne 'Closed' and WorkItemtype( /AreaPath,'{project}') &$orderby=WorkItemId desc

Then using those results, I want to get their children and their childrens children (and as Monty Python Life of Brian states) their childrens childrens children.然后使用这些结果,我想让他们的孩子和他们的孩子的孩子(以及 Monty Python 布赖恩的生活状态)他们的孩子的孩子。

Any help would be appreciated.任何帮助,将不胜感激。

Depending on your service there may be limitations to the number of levels you can dive into.根据您的服务,您可以进入的级别数量可能会受到限制。 If you are programming the service you can increase this limit.如果您正在对服务进行编程,则可以增加此限制。

I am not clear on the structure of your service but I think you are looking for $expand to get the children.我不清楚您的服务结构,但我认为您正在寻找 $expand 来获得孩子。

Here is an example using the odata service.下面是一个使用 odata 服务的例子。 OData uses the ampersand (&) at the first level, but when you expand to lower levels you will need to use a semi-colon (;) to separate select and further expands. OData在第一级使用&符号,但是当你扩展到更低的级别时,你将需要使用分号(;)来分隔select并进一步扩展。

https://services.odata.org/TripPinRESTierService/People?$select=UserName&$expand=Friends($select=UserName;$expand=Friends($select=UserName;$expand=Friends($select=UserName;$expand=Friends($select=UserName))))&$filter=startsWith(UserName,'scott')

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从 node.js package.json 文件克隆 Azure Dev Ops 存储库? - How to clone a Azure Dev Ops repo from node.js package.json file? 将对 azure 开发操作存储库的访问限制为特定的 IP 地址 - Limit access to an azure dev-ops repository to specific IP addresses 在 Azure Dev Ops 中安装并运行 go package 任务 - Install and run go package task in Azure Dev Ops Azure 通过开发操作管道的云服务扩展部署失败 - Azure Cloud Service Extended deployment via dev ops pipeline fails 使用 OData 查询访问 azure 自定义字段 - Accessing azure custom field using OData query 在 Azure 中的 Linux 上运行 Ops Agent - Run Ops Agent on Linux in Azure 从 Prod 为 Azure SQL 创建开发环境 - Dev Environment creation from Prod for Azure SQL 从 Azure Cosmos DB 集合中下载/选择*所有*文档的最快方法是什么 - What's the fastest way to download/select *all* documents from an Azure Cosmos DB collection 使用 OData 查询语法检查是否在 Azure 认知搜索中的枚举字段上设置了标志 - Check if a flag is set on an enum field in Azure Cognitive Search using OData Query Syntax 如何使用 C# 从 Azure Devops 中的 Artifacts/Nuget Feed 获取所有包及其版本的列表? - How to get the list of all the packages with their versions from Artifacts/Nuget Feed in Azure Devops using C#?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM