Customizing e-mail templates

Hi everyone,

I'm trying to include the (only) VCS used for a configuration in the failure e-mail notification. I've read through http://confluence.jetbrains.net/display/TCD6/Customizing+Notifications and even browsed http://confluence.jetbrains.net/display/TCD6/Server-side+Object+Model for a while, but I couldn't find more infos on which objects are available in the FreeMarker templates or how to use them exactly.
Somehow I suppose it would be something like

buildType.getVCSRoots.Get(0).convertToPresentableString

but I couldn't get it to work.

I think it would be nice to get more examples on how to customize the notifications in the documentation.

Thanks anyhow to the whole team for the great work you're doing, I like TC a lot!
Thanks, again, in advance for the help.

Best regards,
Jérôme Jolidon

3 comments
Comment actions Permalink

Hi,
I'm not a specialist in TeamCity but it seems that I have solution for your.

You may include following code to your template:

<#list buildType.getVcsRoots() as vcs>
          <div>VCS #: ${vcs.name}</div>
</#list>



http://javadoc.jetbrains.net/teamcity/openapi/current/jetbrains/buildServer/vcs/VcsRoot.html

And I agree with you that notification manual could contain more info and some examples.
0
Comment actions Permalink

Thanks, it works well. I'll check if I can modify the documentation myself to include the example.

Best regards,
Jérôme

0

Please sign in to leave a comment.