Monday, May 17, 2010

Change check-in email notification to TFS Web Access

There are some very useful articles to change TFS email notifications to link to Team System Web Access:

Changing TFS emails to link to Team System Web
Changing TFS emails to link to Team System Web Part 2

The configurable links include:
- Work Item notification mails
- Build notification mails
- Check-in notification mails
- Mails sent by Team Explorer

However, for check-in notification mails, if your TFS web access is not installed as the default website, and contains a virtual directory as part of the URL, the tfsadminutil tool cannot process the URL correctly, at least not until TFS 2008 SP1. For example, if your TFS web access URL is http://myTFSserver:8080/tswa, tfsadminutil tool will set up the links as http://myTFSserver:8080/ instead.

Here we provide a workaround until tfsadminutil tool has that improved. The workaround requires direct modification of the TFS database. Please note that it is NOT recommended by Microsoft.

Prerequisite: TFS 2008 + SP1 + TFS web access + Hotfix KB957196

Step 1. run the command on the TFS server:
C:\Program Files\Microsoft Visual Studio 2008 Team Foundation Server\Tools> tfsadminutil configureconnections /TSWAUri:http://myTFSserver:8080/tswa

Step 2. connect to TFS database through SQL Server Management Studio. Run the following query.
use TfsIntegration
go
select * from tbl_service_interface

output:
....
8 WorkItemEditor
http://myTFSserver:8080/wi.aspx
8 ChangesetDetail
http://myTFSserver:8080/cs.aspx
8 Difference
http://myTFSserver:8080/diff.aspx
8 ViewItem
http://myTFSserver:8080/view.aspx
....

Step 3. Modify the URLs in the table for the above items.
Update tbl_service_interface
Set url='http://myTFSserver:8080/tswa/wi.aspx'
Where name='WorkItemEditor'

Update tbl_service_interface
Set url='http://myTFSserver:8080/tswa/cs.aspx'
Where name='ChangesetDetail'

Update tbl_service_interface
Set url='http://myTFSserver:8080/tswa/diff.aspx'
Where name='Difference'

Update tbl_service_interface
Set url='http://myTFSserver:8080/tswa/view.aspx'
Where name='ViewItem'

Step 4. After the TFS process is recycled, your check-in email subscription will generate emails linking to TFS web access.

1 comment:

Anonymous said...

I would like to exchange links with your site doublepaddle.blogspot.com
Is this possible?