Forums

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

Jira autmated Email lookupIssues.description.html not working to retain description format for email

James_Gigantes
Contributor
October 10, 2022

Im trying to form an email report using {{LookupIssues}}

example.JPG  

 

I get a result for lookup Issues and I can confirm that the description text is the same. Though I cant seem to pass the description text along with format (as html). It seems to come through as Wiki markup.

PROBLEM:   I am trying to pass *{{lookupIssues.get(0).description.html}}* in order to retain the format present in the issue when viewed on Jira cloud. Though when I place this in the email body, It retains the wiki markup and it wont convert to HTML. 

As an Automator, I would like my Issue format to carry through as HTML, so that Outlook can read the code and retain my formatting. 

1 answer

1 accepted

1 vote
Answer accepted
Mark Segall
Community Champion
October 10, 2022

Hi @James_Gigantes and welcome to the community!

I haven't tried this myself, but I believe it would be this:

{{lookupIssues.get(0).description.htmlEncode()}}
James_Gigantes
Contributor
October 10, 2022

Sadly that didnt work. I also tried .html as I found on this LINK

James_Gigantes
Contributor
October 10, 2022

I found that If I pass 

{{lookupIssues.get(0).description.text}}

 I can put the HTML in the description field and it passes through the automation and  renders properly

Like Mark Segall likes this
Mark Segall
Community Champion
October 10, 2022

Thanks for sharing the link.  According to the documentation, it's not foolproof.  

This may still not be appear as expected

When Jira sends HTML emails, it also incorporates all the styling into the email so therefore the HTML will look as it does in Jira.
Unfortunately, we don't have access to these styles so we just produce raw HTML with no styles.

If you're dealing with a repeatable structure, you may be able to deconstruct/reconstruct it.  For example, if the first line is always bolded, you could do something like this:

<strong>{{issue.description.text.match("^(.*)$")}}</strong>
<p>
{{issue.description.text.match("(?ms)(?!\A)^\S.*")}}

I know this isn't exactly what you're looking for, but it's an alternative option.

Like James_Gigantes likes this
James_Gigantes
Contributor
October 11, 2022

I have to master .match function. Thanks Mark! I will test this out. For the moment, it's good enough to pass. 

Like Mark Segall likes this
James_Gigantes
Contributor
October 11, 2022

@Mark Segall Your suggestion pushed me to look a little harder at other solutions. I found that LookupIssues offers custom fields now. This is an awesome development. I will add some custom fields and create custom HTML formatting for each. Thanks! 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events