简体   繁体   中英

TFS2015 - List how many times tags were used in TFS 2015 On-Premise work items

​Hello,

​I am trying to write an SQL query to list all tags along with the number of how many times they were used in Work Items in TFS2015. I cannot find the connection between tbl_WorkItemCoreLatest, tbl_PropertyDefinition and tbl_TagDefinition that would point me to tags used on work items. I tried to go with the solution from here , but with no success. The query results seems not to match what I see directly in VSTS (eg. searching for a particular tag returns me work items from which some don't have that particular tag, almost as if TFS would store previous states of work items...?) If there's a way to do that with REST API, that will work as well.

Any help will be much appreciated.

You can use TFS REST API below to get all work items with System.Tags field, then calculate how many times they were used:

`http://tfs2015:8080/tfs/DefaultCollection/teamproject/_apis/wit/reporting/workitemrevisions?fields=System.Tags&includeLatestOnly=true&api-version=2`

Another simple way is creating a work item query with Tags column and open this query in Excel to filter the Tags column.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM