Search code examples
azure-devopsodataazure-devops-extensionsazure-devops-server-2019azure-devops-analytics

Azure Devops Server 2019 limits select in expand to 8 columns


Is there a way to change this limit on the server? 2020 does not seem to have this limit. Or potentially is there a better way to write the expand clause that will result in less columns? I need all the data here to produce my report.

...$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))


Solution

  • You can use $expand on the Children rather than Descendants to return information about an item's Children. I got the same errror limit of 8 columns when i used Descendants. The error was gone if i changed to Children

    See below: Change Descendants to 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))