[英]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.