[ https://issues.jenkins-ci.org/browse/JENKINS-13191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=160609#comment-160609 ]
dogfood commented on JENKINS-13191: ----------------------------------- Integrated in !http://ci.jenkins-ci.org/images/16x16/blue.png! [plugins_email-ext #111|http://ci.jenkins-ci.org/job/plugins_email-ext/111/] [JENKINS-13191] bug fix for groovy default template error on success build (Revision 09760ee89846b3598dbcf0fa34808024772a5320) Result = SUCCESS larry.caiyu : Files : * src/main/resources/hudson/plugins/emailext/templates/groovy-html.template > 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 > 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