TFS & Visual Studio ALM – by Neno Loje

(formerly Team System, VSTS)

Changing TFS email notifications to link to Team System Web Access

August 31st, 2007 · 6 Comments · Project Management with TFS, Team Foundation Version Control, Team System Web Access (TWA), TFS 2005, TFS 2008, TFS Administration, TFS Process Customization, TFS Project Portal and Team Communication, TFS Tips and Tricks, TFS Work Item Tracking

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.

 

I published a 2nd part: Changing TFS emails to link to Team System Web Access – Part 2

Tags:

6 Comments so far ↓

  • Tim

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

  • Markus Unterauer

    Very useful!
    * just: wi.aspx does not exist, it must be workitem.aspx
    * If Teamplain Webaccess is installed under another website just replace
    with
    br, Markus

  • Mikael

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

  • Richard

    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!

  • Buck Hodges

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

    Buck

  • Rob

    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 “http://lewis:8080/wi.aspx?id=413”

    Here is what I tried:

    with

Leave a Comment