[ https://issues.jenkins-ci.org/browse/JENKINS-13191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Slide-O-Mix resolved JENKINS-13191. ----------------------------------- Assignee: Slide-O-Mix Resolution: Fixed Fixed in 09760ee > groovy template can't differ success and failure build in email > --------------------------------------------------------------- > > Key: JENKINS-13191 > URL: https://issues.jenkins-ci.org/browse/JENKINS-13191 > Project: Jenkins > Issue Type: Bug > Components: email-ext > Affects Versions: current > Environment: Ubuntu 11.10/Openjdk/jenkins 1.452 > Reporter: Larry Cai > Assignee: Slide-O-Mix > Priority: Minor > > Using email-ext plugin, and set use groovy html template > - Content Type : HTML > - Default content ${SCRIPT} > When the build is SUCCESS, it is still use yellow.gif instead of blue.git > Problem: > <%= build.result == 'SUCCESS' ? "blue.gif" : build.result == 'FAILURE' ? > 'red.gif' : 'yellow.gif' %>" /> > build.result is not string, so the compare is false always. > Solution: > <%= build.result.toString() == 'SUCCESS' ? "blue.gif" : > build.result.toString() == 'FAILURE' ? 'red.gif' : 'yellow.gif' %>" /> > I push the code into github -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira