[ 
https://issues.jenkins-ci.org/browse/JENKINS-13191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=160606#comment-160606
 ] 

SCM/JIRA link daemon commented on JENKINS-13191:
------------------------------------------------

Code changed in jenkins
User: Larry Cai
Path:
 src/main/resources/hudson/plugins/emailext/templates/groovy-html.template
http://jenkins-ci.org/commit/email-ext-plugin/09760ee89846b3598dbcf0fa34808024772a5320
Log:
  [JENKINS-13191] bug fix for groovy default template error on success build

url for the bug https://issues.jenkins-ci.org/browse/JENKINS-13191
build.result == SUCCESS is always false due to build.result is not string
convert to string directly in template to solve this

could be update in java codes as well



                
> 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

        

Reply via email to