Forums

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

HTML Email notification - Wiki Markup renderer for Description

Patrick Löffler
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

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 Leaders.
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)
Patrick Löffler
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 Leaders.
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.

Suggest an answer

Log in or Sign up to answer