[
https://issues.jenkins-ci.org/browse/JENKINS-13191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=160607#comment-160607
]
SCM/JIRA link daemon commented on JENKINS-13191:
------------------------------------------------
Code changed in jenkins
User: slide
Path:
src/main/resources/hudson/plugins/emailext/templates/groovy-html.template
http://jenkins-ci.org/commit/email-ext-plugin/0d17e14249c0e43bb2153cc3ed830fccc3f8026c
Log:
Merge pull request #28 from larrycai/master
[JENKINS-13191] bug fix
Compare: https://github.com/jenkinsci/email-ext-plugin/compare/b19a265...0d17e14
> 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