The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

HTML Email notification - Wiki Markup renderer for Description

Löffler_ Patrick
Contributor
July 19, 2018

Hello,

we use Wiki Markup Renderer for the Issue Description Field.

In (HTML) Emails the Markup isn´t displayed correctly.

Example: In the Email it looks like this: {color:#ff0000}Test{color}

Is there a way that it would be rendered correctly? Maybe edit the binaries (does anybody knows wich file/jar contains the Email renderer?)?

Thanks!

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Payne
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
July 19, 2018

I used the following to convert markdown to HTML to include in an email:

def description = issue.description ?: ""
//convert wiki markup to html in description field
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)
description = renderer.render(description, null)
Löffler_ Patrick
Contributor
July 19, 2018

Thanks for the fast response!

Where I have to insert this Code? It Looks like Groovy. But could i use it also for Default Jira Mail Templates (Issue Updated, ...)?

Payne
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
July 20, 2018

Yes, it's Groovy; I used it in the ScriptRunner "Send a Custom Email" function. Sorry, not sure about doing something similar in the mail templates.