TFS 2017 How to query work items using SQL

I am looking for a way to query work items directly from a TFS SQL database using SQL queries.

For TFS 2010, you could use some database views to achieve this. TFS2010: how to query work items using SQL in relational storage

An example from WIQ is as follows:

SELECT [System.Id], [System.WorkItemType], [System.Title], [System.AssignedTo], [System.State]
FROM WorkItems 
WHERE [System.TeamProject] = @project
  and [System.WorkItemType] = 'Ticket'
  and [System.State] <> 'Closed'
  and [System.State] <> 'Removed'
+4
source share
1 answer

, , - vw_denorm_WorkItemCoreLatest. "" , - . , vw_WorkItemCoreAll.

, WIQ :

SELECT *
FROM [dbo].[vw_denorm_WorkItemCoreLatest]
WHERE [System.TeamProject] = 'MyTeamProject'
  and [System.WorkItemType] = 'Ticket'
  and [System.State] <> 'Closed'
  and [System.State] <> 'Removed'
+5

Source: https://habr.com/ru/post/1669950/


All Articles