在TFS中查找IterationID
我们将 TFS 内的迭代链接到外部系统,以跟踪整个公司的项目。 过去,我们在 TFS 项目中使用 IterationPath 进行链接,但问题是人们会随着项目的进展重命名这些 IterationPath,并且链接会丢失。 因此,经过一些研究,我正在考虑使用 IterationID 进行链接。 TFSWarehouse 中的 IterationID 与 WorkItemTracking 表中的 IterationID 不同,我似乎无法找到一种简单的方法来查找 IterationPath 的 IterationID? 有人知道我们如何才能实现这一目标吗?
we are linking Iterations within TFS to an external system for tracking projects through the entire company. In the past, we were linking using the IterationPath in a TFS Project, but the problem is that people rename these IterationPaths as the projects progress, and the link is lost. So after some research, I'm thinking of doing the linking by using the IterationID. The IterationID in the TFSWarehouse is NOT the same as the IterationID in the WorkItemTracking table, and I can't seem to find an easy way to find the IterationID of an IterationPath? Anyone got any idea how we may be able to achieve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
好的 - 经过进一步挖掘,发现下面的代码迭代了所有迭代,因此使用其中的一个子集,我将得到我需要的东西:)
OK - after some further digging, found the code below that iterates thru all the iterations, so using a subset of this, I will get what I needed :)
为此,我将使用最新 TFS Power Tools 中的 powershell 管理单元。
I'd use the powershell snap-in from the latest TFS Power Tools for this.
如果要打印所有 TFS 区域,请更改以下行:
from: NodeCollection rootNodeCollection = store.Projects[tfsProject].IterationRootNodes;
到: NodeCollection rootNodeCollection = store.Projects[tfsProject].AreaRootNodes;
感谢您的代码,它对我很有帮助。
if you want to print out all TFS Areas then change the following line:
from: NodeCollection rootNodeCollection = store.Projects[tfsProject].IterationRootNodes;
to: NodeCollection rootNodeCollection = store.Projects[tfsProject].AreaRootNodes;
thanks for the code it was helpfull at my end.
这也可以通过使用工作项查询语言 (MSDN 上的 WIQL)。
使用WIQL,您可以查询TFS。 我使用了 C#,但我相信这适用于大多数/所有 .NET 语言。
您可以通过在查询字符串中添加 where 子句来找到特定的 iterationID:
可以通过迭代查询结果来查看它们:
This can also be achieved by using Work Item Query Language (WIQL on MSDN).
With WIQL, you can query TFS. I used C#, but I believe this works with most/all .NET languages.
You could find a specific iterationID by adding a where clause to your query string:
The queryResults can be view by iterating through them: