Need help customizing notification email subject

I'd like all my failure reasons in the TC email  notifications for failed builds to not have the build # in them.  I  tried modifying this file:

ProgramData\JetBrains\TeamCity\config\_notifications\email\build_failed.ftl

Changing this line:

<#global subject>[<@common.subjMarker/>, FAILED] Build ${project.fullName} :: ${buildType.name} <@common.short_build_info build/></#global>

to:

<#global subject>[<@common.subjMarker/>, FAILED] Build ${project.fullName} :: ${buildType.name}</#global>

Note I just removed the  <@common.short_build_info build/>.  However, upon testing a few  failed builds, it still does not remove the build # from subject of  email.  I've also tried restarting both server and agent (although doc  says changes  should be picked up immediate or within a short amount of time).     Restart made no difference.

Is there something else that needs to be done?

2 comments
Comment actions Permalink

Hi,

You modified .ftl file correctly and server/agent restart is not required. Please double check that you changed the correct file (not .dist) in the data directory which is used by TeamCity. Also you can turn on debug-notifications logging preset on Administration>Diagnostics page and check teamcity-notifications.log file.

0
Comment actions Permalink

I turned on debug logging and confirmed the subject works as expected.    There were multiple templates and I needed to modify several of them to make the emails more obvious.

Thanks!

0

Please sign in to leave a comment.