【问题标题】:Azure Devops Server 2019 limits select in expand to 8 columnsAzure Devops Server 2019 限制选择展开为 8 列
【发布时间】:2021-04-28 21:58:24
【问题描述】:

有没有办法改变服务器上的这个限制? 2020似乎没有这个限制。或者可能有更好的方法来编写会导致更少列的扩展子句?我需要这里的所有数据来生成我的报告。

...$select=WorkItemId,Title,WorkItemType,StartDate,TargetDate,State,StateCategory,IterationSK&$expand=Iteration($select=StartDate,EndDate),Project,Descendants($apply=filter(WorkItemType in ('Feature','User Story','Task','Bug') and ProjectSK eq XXXXXXX and State ne 'Removed');$select=Title,WorkItemId,WorkItemType,State,StartDate,TargetDate,ParentWorkItemId,OriginalEstimate,StoryPoints;$expand=Iteration($select=IterationSK,StartDate,EndDate))

【问题讨论】:

    标签: azure-devops odata azure-devops-extensions azure-devops-server-2019 azure-devops-analytics


    【解决方案1】:

    您可以在Children 上使用$expand 而不是Descendantsreturn information about an item's Children。当我使用Descendants 时,我得到了同样的错误limit of 8 columns。如果我改为Children,错误就消失了

    见下文: 将Descendants 更改为Children

    $select=WorkItemId,Title,WorkItemType,StartDate,TargetDate,State,StateCategory,IterationSK&$expand=Iteration($select=StartDate,EndDate),Project,Children($apply=filter(WorkItemType in ('Feature','User Story','Task','Bug') and ProjectSK eq XXXXXXX and State ne 'Removed');$select=Title,WorkItemId,WorkItemType,State,StartDate,TargetDate,ParentWorkItemId,OriginalEstimate,StoryPoints;$expand=Iteration($select=IterationSK,StartDate,EndDate))
    

    【讨论】:

    • children 只有一层。我需要给定史诗之下的整个项目树。
    • @MatthewTheTerrible 恐怕 azure deveps 2019 服务器限制为 8 列是设计使然。您可能需要升级到azure devops 2020,或者您可以使用Children 并使用代码作为解决方法重新构造返回结果。您也可以将此问题报告给Microsoft Development team
    • 他们的 API 是否可用,我可以使用它来确定用户使用的 ADO 版本,以便我可以动态构建查询。
    • @MatthewTheTerrible 没有可用于获取版本的 api。但是您可以向此 url https://tfs2019:port/my_collection/_home/about 发出 http 请求以获取版本详细信息。查看this thread
    猜你喜欢
    • 2021-06-28
    • 1970-01-01
    • 2020-06-18
    • 2020-08-06
    • 1970-01-01
    • 2021-04-01
    • 2020-02-08
    • 2019-12-07
    • 2020-09-15
    相关资源
    最近更新 更多