Convert markdown in description to html for email

Paul Mata December 5, 2019

Using Automation for Jira Cloud, I am trying to convert the description field of my Jira issue, which uses standard wiki markdown to format a list, into a properly formated unordered list to include in an html formatted email.

 

Here is an example of the list formatted in the description field using wiki markdown.

markdown.PNG

 

Here is the rule where you can see that I've tried using the "htmlEncode" smart value to change the formatting:

email_rule.PNG

Here is the output I get:

output.PNG

 

But I don't know what to do with that output in an email to get a properly formatted list. When I put that into an email, it is displayed without line breaks or bullets - and if I don't include the "htmlEncode" function, it looks the same in my email client (Office 365 Outlook).

I'm guessing that I would need to convert the html encoded values to the appropriate <ul> tag, but that's where I'm stuck. Can anyone help, please?

2 answers

1 accepted

1 vote
Answer accepted
Mark Chaimungkalanont
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 5, 2019

Hey there Paul,

I think what you're after is just .html see https://docs.automationforjira.com/issues/dealing-with-markup.html#rendering-html

So you should be able to just do: (no need to wrap it around the <p> tag either:

{{issue.description.html}}
Paul Mata December 5, 2019

That did it! Thanks @Mark Chaimungkalanont I don't know how I missed that in the documentation.

2 votes
matt_w July 10, 2020

Hi,

I'm having exactly the same issue as Paul, however unfortunately following the instructions in https://docs.automationforjira.com/issues/dealing-with-markup.html#rendering-html did not solve the problem for me.

My project automation uses the following email rule:

1. HTML:

{{issue.description.html}}

2. TEXT:

{{issue.description.text}}

3. ORIGINAL:

 {{isse.description}}

However, both {{issue.description.html}} and {{issue.description.text}} don't appear to be interpreted as the email received is empty for those values.


1. HTML:

2. TEXT:

3. ORIGINAL:
Lorem ipsum dolor sit amet, purto aliquip tibique ea qui, in brute aliquid vix, te nam viderer civibus. Ullum virtute nostrud at vim, ex propriae cotidieque disputationi usu, vocent utamur reprehendunt sea ne. Eu audiam meliore sententiae sit. Novum dolores splendide ex ius, at dicam aliquam ceteros mei.

* test
* test
* {color:#FF0000}test{color}

Am I missing something? Can anyone help please?

Thanks!

Olive Sun January 9, 2024

Has this been resolved? Seeing the same issue...

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events