如何使用 TFS PowerShell 获取变更集和相关工作项的列表? [英] How to use TFS PowerShell to get list of changesets and associated work items?
问题描述
我是 PowerShell 和 TFS cmdlet 的新手,我正在尝试检索区域路径中的变更集列表及其关联的工作项.
I'm a novice with the PowerShell and TFS cmdlets and I'm trying to retrieve a list of changesets in an area path, and their associated work items.
我已经列出了某个日期以来的变更集:
I've got as far as listing changesets since a certain date:
Get-TfsItemHistory "$/Project/Branch" -Version "D01/12/10~" -Recurse
并且还列出自同一日期起的工作项:
and also listing workitems since the same date:
Get-TfsItemHistory "$/Project/Branch" -Version "D01/12/10~" -Recurse | %{ $_.workitems }
每个查询返回相同数量的结果,第二个查询返回重复的工作项.这看起来很有希望,因为工作项有很多变更集,所以我认为我离合并结果不远了.
Each query returns the same number of results, with the second query returning duplicate workitems. This seems promising, as there are many changesets to workitems, so I assume I'm not far off combining the results.
推荐答案
是的,您走对了.尝试将其作为查看与变更集关联的工作项的一种方式:
Yes, you're on the right track. Try this as a way to view workitems associated with a changeset:
Get-TfsItemHistory "$/Project/Branch" -Version "D01/12/10~" -Recurse |
Select ChangesetId -exp WorkItems |
Format-Table Id,Title -GroupBy ChangesetId -Auto
这篇关于如何使用 TFS PowerShell 获取变更集和相关工作项的列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!