In TFS web interface I can query for items with various link types:
However, Changesets, while they are a legitimate and distinct link type in TFS are not included in that list:
Using the web interface, how does one query for Work Items that either do, or do not include links of the type Changeset?
Find a changeset by IDIn Source Control Explorer, press Ctrl + G. The Go to Changeset dialog box appears. Type the number of the changeset and choose OK. If you don't know the number, choose Find.
you can go to the Source Control Explorer in Visual Studio and right-click on your project and select View History . This will show you the list of all changesets made to that project, who made them, the date they were made and any comment added to those changesets.
Just copy and paste url inside your browser and you are done. If you have not previously authenticated with your TFS or VSO you will be prompted for credentials, then the file is downloaded.
You are right. There is just not changeset LINKS field in default TFS Work Item Query Editor on web interface. Since if you do a Query and include external link count >0 this will actually give you all work items that have changesets associated with it.
Another way is using TFS API to achieve it. Suggest you use the way provided by Buck in this great blog: Listing the work items associated with changesets for a path
More ways please look at this similar question: How can I query work items and their linked changesets in TFS?
You can also use the REST API to query out the work items which associated with changes.
1- Do a Query and include External Link Count > 0
(This will give you
the work item list with the external link which also including linked to the
changesets.)
2- List the work item IDs and use below PowerShell script sample to filter the work items which associated to changesets. (You can also export the list to a .csv file)
$baseUrl = "http://server:8080/tfs/CollectionLC/_apis/wit/workitems?ids=75,76,77,78&"+"$"+"expand=relations&api-version=1.0"
$workitems = (Invoke-RestMethod -Uri $baseUrl -Method Get -UseDefaultCredential).value|where({$_.relations.attributes.name -eq 'Fixed in Changeset'})
$WorkitemResults = @()
foreach($workitem in $workitems){
$customObject = new-object PSObject -property @{
"workitemId" = $workitem.id
"workitemTitle" = $workitem.fields.'System.Title'
"State" = $workitem.fields.'System.State'
"CreatedBy" = $workitem.fields.'System.CreatedBy'
"Project" = $workitem.fields.'System.TeamProject'
"AssignedTo" = $workitem.fields.'System.AssignedTo'
}
$workitemResults += $customObject
}
$workitemResults | Select `
workitemId,
workitemTitle,
Project,
State,
CreatedBy,
AssignedTo #|export-csv -Path C:\WorkitemsWithChangesets.csv -NoTypeInformation`
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With