Visual Studio Team System (VSTS) Blog - by Neno Loje

Neno's Blog about Team Development and Software Quality with Microsofts ALM platform - since 2005

News

Recent Posts

Community

Tags

Email Notifications

VSTS Blogs

VSTS Sites

VSTS Community

My Other Blogs

German VSTS Websites

Archives

Changing TFS email notifications to link to Team System Web Access

Thanks to this MSDN Forums post I was able to change the link included in every TFS notification e-mail to point to TSWA instead of the project portal.

Here’s the full story:

When using project alerts to get notified about work item changes you get an email containing a link to the project portal:

Work Item Changed email notification by TFS

If you follow the link you might get a bit dissapointed when looking at this very basic work item details page:

Project Portal Work Item Details

Since Team System Web Access is now avaible from Microsoft free of charge we can change the link in the template for all notification messages to point to the new TSWA.

Changing the e-mail template

  1. On the TFS app tier open the folder:
    %ProgramFiles%\Microsoft Visual Studio 2005 Team Foundation Server\Web Services\Services\v1.0\Transforms
  2. Create a backup of the file WorkItemChangedEvent.xsl, which we will be editing in the next step.
  3. Replace the text:

    <xsl:value-of select="DisplayUrl" />

    with:

    <xsl:value-of select="concat(substring-before(DisplayUrl,':8080/WorkItemTracking/WorkItem.aspx?artifactMoniker='),':8090/wi.aspx?id=',substring-after(DisplayUrl,'artifactMoniker='))" />

    The bold printed 8090 is the port where you installed TSWA at.
  4. Save the file and you are done.

If you now get a new notification e-mail and click on the link you’ll see the following much nicer work item details form provided by TSWA:

Team System Web Access Work Item Detail Form

Note: Be aware that you either need to use Windows authentication with TSWA to make this work or you need to be already logged in and the session must be still alive.

Comments

Tim said:

Very nice!  

Any idea how to do the same thing for a Changeset notification email?

# September 4, 2007 9:39 AM

Markus Unterauer said:

Very useful!

* just: wi.aspx does not exist, it must be workitem.aspx

* If Teamplain Webaccess is installed under another website just replace <xsl:value-of select="DisplayUrl" />

with <xsl:value-of select="concat('address_of_teamplain/workitem.aspx',substring-after(DisplayUrl,'artifactMoniker='))" />

br, Markus

# September 10, 2007 7:10 AM

Mikael said:

What if TSWA is installed at completely different url (using host header names instead of ports) ???

# September 10, 2007 7:33 AM

Richard said:

For TeamPlain 2.0, the link should be:

:8090/UI/Pages/WorkItems/WorkItemEdit.aspx

It requires you to open TeamPlain in the brower first, or you'll get "Session expired or you are not logged in" error?

Is there a link can automatically log in?

I'm using Integrated Windows Authentication.

Thanks!

# September 12, 2007 11:04 PM

Buck Hodges said:

For those using TeamPlain, you can upgrade to Team System Web Access (TSWA), which is available as a free download at msdn2.microsoft.com/.../bb676728.aspx.  The work item URL that Neno uses requires TSWA.

Buck

# September 14, 2007 10:45 PM

Rob said:

Cant get the syntax correct:

Have tried what Markus Unterauer posted with no luck.

When I hover over the link it act like it is looking at the "lewis/wi.aspx

Here is what I tried:

with <xsl:value-of select="concat('team.tigerpawsoftware.com/workitem.aspx',substring-after(DisplayUrl,'artifactMoniker='))" />

# November 15, 2007 4:50 PM

MSDN Blog Postings » VSTS Web Access Power Tool for Team System 2008 released! said:

Pingback from  MSDN Blog Postings  &raquo; VSTS Web Access Power Tool for Team System 2008 released!

# November 30, 2007 9:18 PM

MSDN Blog Postings » Team System Web Access 2008 Power Tool is now available said:

Pingback from  MSDN Blog Postings  &raquo; Team System Web Access 2008 Power Tool is now available

# November 30, 2007 9:19 PM