in an *.ftl, how to check for a build configuration's parameter presence?
Hi,
I need to customize the build_failed.ftl for TC 8.0.1 so that in case a "report.build.steps" configuration parameter is set, a custom email is sent. Something like:
<#if buildType.getParameters().containsKey("report.build.steps")>
...here goes a custom email content...
</#if>
The example above is based on Yegor Yarko's suggestion given on http://youtrack.jetbrains.com/issue/TW-14296. The problem is it doesn't work :).
"buildType.getParameters()" returns a "freemarker.template.SimpleHash". The "<#if buildType.getParameters().containsKey("report.build.steps")>" gives me "Expression buildType.getParameters().containsKey is undefined".
How do I iterate "buildType.getParameters()" to check if it contains a hash with a key "report.build.steps"? I'm no good at Java so please bear with me.
Please sign in to leave a comment.
Hi John,
I added a comment into the issue.