将变更集和工作项与构建重新关联 [英] Re-associate changesets and work items with build

查看:88
本文介绍了将变更集和工作项与构建重新关联的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以从Team Foundation Server上已完成的构建中手动删除关联的变更集和工作项吗?

Is there any way to either manually remove associated changesets and work items from completed build on Team Foundation Server?

例如:我签入了变更集,但是我犯了一个错误,并将其与错误的工作项关联。在我注意到这一点之前,我创建了一个发布版本,该版本将变更集和工作项相关联,并自动生成变更日志。现在,错误的工作项与构建相关联。为了纠正我的错误,我删除了工作项和变更集之间的链接。
但是,我完成的构建和工作项之间仍然存在联系。有什么方法可以通过用户界面删除链接,或者我必须深入研究TFS API?

For example: I check-in a changeset, but I make a mistake and I link it with wrong work item. Before I notice that, I create a release build which associates changesets and work items and automatically generates changelog. Now the wrong work item is associated with a build. To fix my mistake, I remove link between work item and changeset. However, there is still link between my completed build and work item. Is there any way to remove the link via user interface or I have to dig down into the TFS API?

我试图删除已完成的构建并开始一个新的构建,但是,与删除的版本关联的工作项和变更集与新的版本无关(即使我删除了以前的版本)。有人知道如何强制TFS将工作项和变更集与新版本关联吗?

I tried to delete my completed build and start a new one, however the work items and changesets that were associated with the deleted build are not associated with new build (even if I deleted the previous build). Does anyone know how to force TFS to associate work items and changesets with the new build?

推荐答案

做完一些研究后,我迷失了方向根据本文( https://social.msdn .microsoft.com / Forums / en-US / 76462cd5-070f-4fba-8206-550b5511ae68 ),那里有人遇到类似的问题。我还检查了 http://www.woodwardweb.com/tfs_top_tip/tfs_top_tip_15.html上的引用文章

After doing some research I have stumbled upon this article (https://social.msdn.microsoft.com/Forums/en-US/76462cd5-070f-4fba-8206-550b5511ae68) where someone had similar problem. I have also checked the referenced article on http://www.woodwardweb.com/tfs_top_tip/tfs_top_tip_15.html.

在删除上一个版本后,我还检查了我的版本的诊断结果,并在日志中找到了这一行:

After I deleted the last build, I have also checked the dignostic output from my build and found this line in the log:

警告:找不到最后一个标签 XXXXXXXXXXXXXXXXXXXX:没有变更集将与构建相关联。

,找不到的标签名称恰好是由删除的内部版本创建的标签名称。
TFS清楚地记得以前的某个标签。

And the name of the label that could not be found was exactly the name of the label, created by the deleted build. TFS obviusly remembers the previous label somewhere.

我已经检查了TFS收集数据库和voila,这是解决方案:

I have checked the TFS collection database and voila, here is the solution:


  1. 删除最后几个版本(并检查删除这些版本的标签)。

  2. 连接到TFS收集数据库。

  3. 打开表 tbl_BuildDefinition

  4. LastBuildUri LastGoodBuildUri LastGoodBuildLabel 其中:


    • LastGoodBuildLabel是实际的标签,它将是将变更集和工作项与构建相关联的新基准。

    • LastGoodBuildUri是在源历史记录中创建了最后一个标签的构建ID (您可以在构建历史记录中找到它)

    • LastBuildUri是上次运行构建的ID(与LastGoodBuildUri相同)

  1. Delete last few builds (and check the labels for those builds are deleted).
  2. Connect to TFS collection database.
  3. Open table tbl_BuildDefinition
  4. Find the build definition for which you want to reassociate changesets and change values in LastBuildUri, LastGoodBuildUri and LastGoodBuildLabel where:
    • LastGoodBuildLabel is the actual label which will be the new baseline for associating changesets and work items with build,
    • LastGoodBuildUri is the ID of build that created the last label you have in your source history (you can find this in your build history)
    • LastBuildUri is the ID of last run build (same as LastGoodBuildUri)

这篇关于将变更集和工作项与构建重新关联的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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