You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
I would like to convert wiki markup from custom field (free text) to HTML by the script runner post function - send custom email.
How would the path look like?
Now I have the wiki style:
<% out << issue.getCustomFieldValue(componentManager.getCustomFieldManager().getCustomFieldObjectByName("Expected Problems")) %>
2015-08-07_11h51_49.png
I have resolved this issue
<% 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(componentManager.getCustomFieldManager().getCustomFieldObjectByName("field name")) def renderer = rendererManager.getRendererForField(fieldLayoutItem) String desc = renderer.render(issue.getCustomFieldValue(componentManager.getCustomFieldManager().getCustomFieldObjectByName("field name")), null) %> <%= desc %>
For any one who was looking for a solution on this, scriptrunner documentation has a latest solution. See https://scriptrunner.adaptavist.com/5.0.9/jira/builtin-scripts.html#_send_a_custom_email
If you are sending HTML mails you will want fields containing wiki markup to be converted to HTML. You can use the following code in your templates.
${helper.render(issue.description)}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.