3

I'm trying to change the subject of email alerts generated by TFS 2015. So far, I figured out, where to find the template of the email body at

c:\Program Files\Microsoft Team Foundation Server 14.0\Application Tier\TFSJobAgent\Transforms\1033\BuildCompletedEvent.xsl

However, I still got no clue, where the subject of the email is set. Can anyone provide a hint?

Thanks in advance

Hanno
  • 31
  • 2
  • 2
    From TFS 2010, but it may still be the same: http://stackoverflow.com/questions/11741616/how-do-i-modify-subject-line-of-a-tfs2010-build-completion-email-alert – DaveShaw Nov 09 '15 at 12:31
  • Thanks a lot ... I've already read this question. I was just hoping, that meanwhile there is a way to change the subject in TFS 2015? – Hanno Nov 09 '15 at 12:46
  • If there isn't, if you really have to change the subject, a workaround could be subscribe to the Event Service and create your own e-mails. It's probably more work than you need to though. – DaveShaw Nov 09 '15 at 12:50
  • I've read about the service hooks, but I don't want to overshoot the target. ... I just couldn't believe, that there's no easy way to modify the subject :/ – Hanno Nov 09 '15 at 13:17

2 Answers2

0

We can only customize the format for TFS email alerts by default. The event service uses the .xsl and the plaintextXsl files to transform the XML data for an event into an e-mail message. Edit the .xsl file to get a different format for the email notification.

The content of the emails that are issued is automatically generated from the TeamFoundation.xsl file and BuildCompletedEvent.xsl. Modifying the TeamFoundation.xsl file is not recommended. You need to subscribe to the Event Service and create your own e-mails as DaveShaw mentions.

Cece Dong - MSFT
  • 29,631
  • 1
  • 24
  • 39
0

It is not allowed to modify email subject via modifying the email template in TFS2015.

You have to subscribe to TFS events via API, this method gives the option to set email subject you want. Check this blog for further information: http://geekswithblogs.net/BobHardister/archive/2013/07/24/tfs-2012-api-create-alert-subscriptions.aspx (The blog is written for TFS2012, applies to TFS2015 as well)  

Vicky - MSFT
  • 4,970
  • 1
  • 14
  • 22