Email Notification: Include more information about triggers.

When getting email notifications I use

<#if build.triggeredBy.triggeredByUser>(triggered by ${build.triggeredBy.user.descriptiveName?html})</#if>
where it gives me the name of the user that triggered the build. This line is of course from the ftl files.

On the teamcity server I see more information such as time and other builds that may have triggered this build.

Question: Is there a way to have that information included in the email notification?

Thank you.

5 comments
Comment actions Permalink

I've tried

    Triggered Date: ${build.triggeredBy.getTriggeredDate}
    Triggered Date: ${project.getTriggeredDate}
    Triggered Date: ${build.triggeredBy.getTriggeredDate()}
    Triggered Date: ${project.getTriggeredDate()}



to get the date. But all of them give me a template error.
0
Comment actions Permalink

Hi,

Please try ${build.triggeredBy.triggeredDate}.
You can consult with the FreeMarker expressions here: http://freemarker.sourceforge.net/docs/dgui_template_exp.html


--
Maxim

0
Comment actions Permalink

I've consulted a bit of FreeMarkers guides but I'm not exactly sure what I'm supposed to be looking at.

    Triggered date: ${build.triggeredBy.triggeredDate}


that line of code still yields a template error.
0
Comment actions Permalink

Hi!

It seems FreeMarker is more verbose than I thought =)

The doc says to add "?date" or "?time" to print the Date object:
http://freemarker.sourceforge.net/docs/ref_builtins_date.html#ref_builtin_date_datetype

Please try that.

--
Maxim

0

Please sign in to leave a comment.