简体   繁体   中英

Change subject in TFS 2015 email alerts

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

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.

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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM