A way to find out all affected workItem files or chgsets groups in TFS 2008?

I am trying to figure out which files were affected by a work item in TFS 2008.

I understand that this is a duplication of a question already asked by someone else here - Viewing a list of all files modified as part of Workitem in TFS , but this remained unanswered, and I was, and so on, looking for this for a while.

I understand that you can view the link tab of a work item, and then view each set of changes to see the files that have changed. But this work item is likely to be associated with many changesets associated with it, and I would like to view the files modified as part of the work item, but I feel that the likelihood of a file or two missing is very high if I have to rely on viewing each of the 100+ changesets individually.

Does anyone know how to do this? Thanks in advance for any help or guidance.

+6
tfs changeset tfs2008 workitem
source share
3 answers

Sounds like work for Powershell ...

function Get-TfsItem([int] $workItemNumber) { Get-TfsServer njtfs -all | foreach { $_.wit.GetWorkItem($workItemNumber) } | foreach { $_.Links } | foreach { ([regex]'vstfs:///VersionControl/Changeset/(\d+)').matches($_.LinkedArtifactUri) } | foreach { $_.groups[1].value } | Get-TfsChangeset | Select-TfsItem | Sort Path -Unique } 

The first few lines seem ugly. We need to get into the webservice API directly since the TFS cmdlets do not cover the bug tracking system. And the objects that we return require some regular expression of love before they do what we need. The foreach piping is, again and again, a bad Powershell idiom that occurs when you connect an unfriendly API with a lame projection operator. (I use my own replacement personally, but you cannot rely on it.)

The last 3 lines should be taken for granted if my TMS Power Cmdlets are installed and doing their job.

+3
source share

I just found the Scrum Power Tools plugin for VS 2010 that does this with the click of a button in VSS, installed and working. http://visualstudiogallery.msdn.microsoft.com/3f261226-530e-4e9c-b7d7-451c2f77f262

I'm just trying to get PowerShell version 2010 to work. http://msdn.microsoft.com/en-us/vstudio/bb980963

The first problem is that the pwoer shell option is not installed by default, use a special installation and select this option. Upon completion, the powershell prompt appears in the TFS powertools 2010 menu, the commands only work there.

To get the server I had to replace njtfs with the url http: // tfsserver: 8080 / tfs and delete -all. the script is still not working.

Ultimately, I need a detailed report that lists: the original 'work item' 'change set'

For example:
xyz.cs 'work item 1' 'C397'
xyz.cs 'work item 2' 'C399'

In the end, I then need to figure out that work item 1 depends on work item 2. I also need to track the work of item 1 to check the status.

Can anyone help with the 2010 version of the script? I have never written a PS before.

+1
source share

I needed the same thing, and I wrote the TFS utility for myself using the TFS API. This allows you to see all the changes that a work item is triggering over time, and some other things. I put it on codeplex. You can get it from:
tfshelper.codeplex.com

+1
source share

All Articles