Comments are truncated to 71 or 72 characters, because behind the scenes the ext email uses the title property instead of the comment property.
Save this in Jenkins> email-templates as test.template. Note the use of cs.comment instead of cs.title
<% def changeSets = build.changeSets if(changeSets != null) { def hadChanges = false %> <table class="section"> <tr class="tr-title"> <td class="td-title" colspan="2">CHANGES</td> </tr> <% changeSets.each() { cs_list -> cs_list.each() { cs -> hadChanges = true %> <tr> <td> Revision <%= cs.metaClass.hasProperty('commitId') ? cs.commitId : cs.metaClass.hasProperty('revision') ? cs.revision : cs.metaClass.hasProperty('changeNumber') ? cs.changeNumber : "" %> by <B><%= cs.author %></B> </td> <td>${org.apache.commons.lang.StringEscapeUtils.escapeHtml(cs.comment)}</td> </tr> <% cs.affectedFiles.each() { p -> %> <tr> <td class="filesChanged">${p.editType.name}</td> <td>${p.path}</td> </tr> <% } } } if ( !hadChanges ) { %> <tr> <td colspan="2">No Changes</td> </tr> <% } %> </table> <br/> <% } %>
Then in your editable email after build add the following line:
${SCRIPT, template="test.template"}
source share