Finding a TFS 2012 generic work item URL is way harder than is reasonable

You’d think it would be easy to find out how to get a direct link to any work item in a collection in TFS, but it’s not. In 2010 there was an URL format that worked, but they ditched that when 2012 came out and didn’t really document any replacement. When you search for work items in 2012, you get a link that includes the project name like

https://server:port/tfs/{collection}/{project}/_workitems/edit/{itemId}

So it’s only accurate for work items in that project. Not really suitable for a generic link to include in a CI report or to tokenize work item references in external systems (like SmartBear’s Collaborator). Argh!!

Bart Wullems to the rescue! Bart wrote up an article that got me on the right track. In VS2012, Team Explorer contained a context menu item called “Copy Full Path”. This is gone from VS2013, much to my confusion and dismay, but I had a machine with VS2012 still pointed at our TFS and I was able to grab the URL as in Bart’s article. The 2012 generic URL format is:

https://server:port/tfs/web/wi.aspx?pcguid={collectionGuid}&id={itemId}

You can enumerate your collections from the TFS API to find the GUID if you don’t have a copy of VS2012 lying around, or you can do what most people do after using TFS for a few years and just buy a better issue tracker that doesn’t make your life a living hell. I’ve heard rumblings that business users are looking at JIRA, which I’ve used in the past and enjoyed very much, so I’ll be encouraging them any way I can. Personally I think FogBugz is the greatest tracker ever created, but apparently my vote doesn’t count since I’m just a developer 😉

This entry was posted in Code Review, Continuous Integration. Bookmark the permalink.

Leave a comment