Click here to Skip to main content
15,888,527 members
Articles / DevOps / TFS

Add Work Item Links from Check In Comments

Rate me:
Please Sign up or sign in to vote.
4.89/5 (4 votes)
18 Nov 2013CPOL1 min read 13.2K   64  
How to add work item links from check in comments

Introduction

The other night while watching the Visual Studio 2013 Launch, a question came up asking if the team had added support yet for automatically linking work items to the change set created when checking in as it currently is in Git. Currently, this functionality doesn't exist for TFVC Check ins, at the time I didn't think anything of it but tonight for some reason I thought "hey that would be something simple to create and should hopefully make lives easier for developers". So I opened up Visual Studio and at the same time started a new project on GitHub for TFS Server Plugins. The code required for the plugin was very basic, basically I just checked the comment from the check in with a regular expression and then added the links between the change set and all the IDs found in the comments.

Example

If you have a comment that says "Changed all site references from Team Foundation Service to Visual Studio Online for item #365", this will when checked in go and try find a work item with the id 365 and if found, it will add a link between work item 365 and the check ins change set number.

Getting the Code

The code can be found on GitHub at https://github.com/Gordon-Beeming/TFS.ServerPlugins. Just download and compile the TFS.AutoAttachWorkItemIDs project and then copy the TFS.AutoAttachWorkItemIDs.dll and TfsApi.dll into the Plugins folder on your TFS server which is C:\Program Files\Microsoft Team Foundation Server 12.0\Application Tier\Web Services\bin\Plugins for TFS 2013.

What Version of TFS Will This Work With?

This plugin will work with most of the latest TFS versions, however you will need to retarget the references for versions before TFS 2013.

Happy Deving Smile

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect SSW
South Africa South Africa

Comments and Discussions

 
-- There are no messages in this forum --