TFS 2013 Merge Work Items Event Handler – for automatic association to work items after merge

12/10/2015

tags: , , ,
no comments

Hi

Found great tool – https://mergeworkitems.codeplex.com/

Suppose you work in your own branch, and associate each changeset you check in to work items. Then, after week or two of work you merge your changes to the integration branch – How will you associate the changes to the work items you associated while working in your branch?

Well, this tool does it. It’s a server plugin that does the work for you after a merge operation you check in. the plugin links all work items associated to merged changesets – to the new changeset created.

However, a little bit of effort needed to deploy the plugin. no installation kit.

First, you need to copy binaries to TFS plugins folder in server – for example – C:\Program FIles\Microsoft Team Foundation Server 12.0\Application Tier\Web Services\bin\plugins.

Then, You have to create a power shell script and run it.

The power shell script that appears in codeplex does NOT work.

Here’s a fixed version:

$PathToAss=”C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\ReferenceAssembles\v2.0″
Add-Type -Path “$PathToAss\Microsoft.TeamFoundation.Client.dll”
$CollectionBaseUrl = “http://TFSMachine:8080/tfs/yourCollection/”;
$tfsColl = [Microsoft.TeamFoundation.Client.TfsTeamProjectCollectionFactory]::GetTeamProjectCollection($CollectionBaseUrl);
$CollectionHive = $tfsColl.GetService(“Microsoft.TeamFoundation.Framework.Client.ITeamFoundationRegistry”);
$CollectionHive.SetValue (“/Inmeta/MergeEventHandler/Enabled”, “True”);

The account running the TFS service MUST have “Make requests on behalf of others” permission on the specified collection

Dan

Add comment
facebook linkedin twitter email

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*