简体   繁体   English

TFS2015-列出在TFS 2015本地工作项目中使用了多少次标签

[英]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. 我正在尝试编写一个SQL查询来列出所有标签以及它们在TFS2015的工作项中使用过的次数。 I cannot find the connection between tbl_WorkItemCoreLatest, tbl_PropertyDefinition and tbl_TagDefinition that would point me to tags used on work items. 我找不到tbl_WorkItemCoreLatest,tbl_PropertyDefinition和tbl_TagDefinition之间的连接,该连接会将我指向工作项上使用的标签。 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. 查询结果似乎与我在VSTS中直接看到的结果不匹配(例如,搜索特定标签会返回一些没有该特定标签的工作项,就像TFS会存储以前的工作项状态一样。) ?)如果有使用REST API的方法,那也可以。

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: 您可以使用下面的TFS REST API通过System.Tags字段获取所有工作项,然后计算使用了多少次:

`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. 另一种简单的方法是使用“标签”列创建工作项查询,然后在Excel中打开此查询以过滤“标签”列。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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