I was following Script Runner documentation to take the Description field and render it as Wiki in the email. I've used
But I get the following error when I try to preview (or in the log):
2016-10-10 13:18:35,487 http-bio-8080-exec-6919 ERROR Peter.b 798x4556140x3 12f2645 172.29.20.173,0:0:0:0:0:0:0:1 /rest/scriptrunner/latest/canned/com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.SendCustomEmail/preview [common.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: No such property: helper for class: groovy.lang.Binding groovy.lang.MissingPropertyException: No such property: helper for class: groovy.lang.Binding
I'm using JIRA 6.3.12 and Script Runner 3.0.16
The helper variable in the binding is only available in 126.96.36.199 and beyond. For JIRA 7 users, you'll want to use 4.3.7 and beyond.
This was part of the rewrite of the Send Custom Email postfunction we did back in July to add features like this.
Thanks Jonny for the investigation.
Any case you are aware of any other function I could use until upgrading to JIRA 7 so that my description field will show more like the original? No wiki formatting, but at least if the description has like few separate lines, I'd like to see this in the email too. Now I get the text from Description field in 1 single like of text).
Example - keep this kind format in the email:
This is the issues.
Please investigate. Further data:
Instead of: This is the issues. Please investigate. Further data: bla bla bla
I'm investigating this now.
I've noticed that in the version-specific documentation, we don't mention the helper:
I'd hazard that's deliberate. It well may be that this only works in JIRA 7.
for Jira 6.3 simply paste the following code in "E-mail template" part:
def rendererManager = com.atlassian.jira.component.ComponentAccessor.getComponent( com.atlassian.jira.issue.RendererManager.class)
def fieldLayoutItem = com.atlassian.jira.component.ComponentAccessor.getFieldLayoutManager().getFieldLayout(issue).getFieldLayoutItem("description")
def renderer = rendererManager.getRendererForField(fieldLayoutItem)
String desc = renderer.render(issue.description, null)
Hey admins! I’m Dave, Principal Product Manager here at Atlassian working on our cloud platform and security products. Cloud security is a moving target. As you adopt more products, employees consta...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs