Reputation: 685
I would like to get a list of work items in Azure DevOps Services with a column displaying the team responsible for every work item. This seems to be impossible!! I don't mind to use any technology available (REST, OData, Queries, ...) but I cannot find any way of doing it.
The work items have an Area Path and they are assigned to Teams, so in SQL it would be like a simple join between the tables, but not so with the Azure DevOps queries.
Any ideas?
Upvotes: 1
Views: 174
Reputation: 13479
You can use the OData query like as below:
Before you use this OData query, ensure you are the member of Project Administrators
group so that you can access and manage teams in the Azure DevOps project.
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})
For example, below sample is to list work items assigned to a specified area path and show the names of teams that the work items belong to.
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')
Result:
If the area path has been assigned to multiple teams, it will list all the teams which the area path is assigned to.
Upvotes: 3
Reputation: 16008
It may be available through process customization and work item rules.
Area ID
:Area ID
you may find in query results:Upvotes: 0