in an *.ftl, how to check for a build configuration's parameter presence?


I need to customize the build_failed.ftl for TC 8.0.1 so that in case a "" configuration parameter is set, a custom email is sent. Something like:

<#if buildType.getParameters().containsKey("")> goes a custom email content...

The example above is based on Yegor Yarko's suggestion given on The problem is it doesn't work :).

"buildType.getParameters()" returns a "freemarker.template.SimpleHash". The "<#if buildType.getParameters().containsKey("")>" gives me  "Expression buildType.getParameters().containsKey is undefined".

How  do I iterate "buildType.getParameters()" to check if it contains a hash with a key  ""? I'm no good at Java so please bear with me.

1 comment
Comment actions Permalink

Hi John,

I added a comment into the issue.


Please sign in to leave a comment.