将拉取请求链接到 TFS 数据库中的工作项 [英] Linking pull requests to the workitems from the TFS database

查看:52
本文介绍了将拉取请求链接到 TFS 数据库中的工作项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用自定义查询(针对 TFS 数据库:Tfs_DefaultCollection 和 Tfs_Warehouse)来检查所有变更集是否都有与其链接的工作项.我们使用来自 Tfs_Warehouse 数据库的 FactWorkItemChangeset 表.目前我们正在迁移到 TFS Git,我们想要更新我们的自定义查询以检查所有拉取请求是否有一个工作项链接到它.例如:
Git 拉取请求及其工作项我们不知道拉取请求在 Tfs_Warehouse 或 Tfs_Defaultcollection 数据库中的哪个位置链接到工作项.有谁知道这个链接存储在哪里?

解决方案

我们终于在 Tfs_DefaultCollection.WorkItemFiles 中找到了链接!例如:选择 *来自 [dbo].[WorkItemFiles]其中 FilePath = 'vstfs:///Git/PullRequestId/4f39e226-6f44-4e56-a216-f45969d8147d%2fab3368e0-56ef-468f-8e14-43065c433a219%2f>6

结果如下:编号 427787文件路径 vstfs:///Git/PullRequestId/4f39e226-6f44-4e56-a216-f45969d8147d%2fab3368e0-56ef-468f-8e14-43065c433a21%2f2619

ID 列包含工作项 ID 和 FilePath 2 哈希值(由 '%ef' 分隔),最后是拉取请求 ID.在此示例中,工作项 427787 链接到拉取请求 2619.

We use custom queries (against TFS databases: Tfs_DefaultCollection and Tfs_Warehouse) to check if all changesets have a workitem linked to it. We use the FactWorkItemChangeset table from the Tfs_Warehouse database. Currently we are migrating to TFS Git and we want to update our custom queries to check if all the pull requests have a workitem linked to it. For example:
Git pull request and its workitem We don't know where in the Tfs_Warehouse or in the Tfs_Defaultcollection database the pull request is linked to the workitem. Does anyone know where this link is stored?

解决方案

We finally found the link in de Tfs_DefaultCollection.WorkItemFiles! For example: select * from [dbo].[WorkItemFiles] where FilePath = 'vstfs:///Git/PullRequestId/4f39e226-6f44-4e56-a216-f45969d8147d%2fab3368e0-56ef-468f-8e14-43065c433a21%2f2619'

This yields this result: ID 427787 FilePath vstfs:///Git/PullRequestId/4f39e226-6f44-4e56-a216-f45969d8147d%2fab3368e0-56ef-468f-8e14-43065c433a21%2f2619

The ID column contains the workitem id and the FilePath 2 hashes (separated by '%ef') and finally the pull request id. In this example workitem 427787 is linked to pull request 2619.

这篇关于将拉取请求链接到 TFS 数据库中的工作项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆