Hi all,
I'm using the Jira automation plugin with a html email template I created.
I have noticed that html links which are in description or comments get converted to just text in the email. I guess I understand why this is, because it does not contain the html info.
Is there a way for these links to retain there html formatting?
Thanks!
Hi @Hunter1428
Would you please provide an example of your automation rule's email content that is not keeping the formatting? Thanks!
Best regards,
Bill
Hi @Bill Sheboy
Rule: when ticket enters status submitted send email to x (HTML Format)
I'm using the smart key {{issue.fields.description}} to get the description. When you create/update a ticket with a link in the description, the email is sent. But the hyperlink is not present on the link in the email.
Here is the basics of the HTML template:
<table style="margin-left: auto; margin-right: auto;" width="50%" cellspacing="0" cellpadding="0"><tbody><tr><td style="width: 552px; vertical-align: top; text-align: left;"><table style="width: 100%; margin-left: auto; margin-right: auto;" cellspacing="0" cellpadding="0"><tbody><tr><td> </td></tr><tr><td style="background-color: #e0e0e0;"><h3>Description</h3></td></tr><tr><td><hr /></td></tr></tbody></table><table style="width: 100%; margin-left: auto; margin-right: auto;" cellspacing="0" cellpadding="0"><tbody><tr style="height: 13px;"><td style="text-align: left; height: 13px;"><span style="color: #333333;"> {{issue.fields.description}} </span></td></tr></tbody></table></td></tr></tbody></table>
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, @Hunter1428
Is there any text missing from the Description in the email, or is it otherwise complete?
Have you tried {{issue.description}} removing the fields prefix to see how that impacts the formatting?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Bill Sheboy
There is no text missing, all is present in the email.
I just replaced {{issue.fields.description}} with {{issue.description}}, created a new ticket with a HTML link in (confirmed it was a html link by clicking it) submitted the ticket. Received the email and the link is indeed still just text, no HTML :(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Gotcha. Please try this to force the description to be usable in HTML content:
{{issue.description.htmlEncode}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately did not work.
I created a new rule just to send the description of a ticket with a HTML link and still only shows as text.
Maybe this also helps, bullet point formatting is also strange. Instead of it showing as points or numbers it shows as * instead.
Pic of rule.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry I missed the issue here..it appears that the automation rule engine does not yet process the wiki markup from the fields in Jira. Here are the related things in the suggestion backlog:
As a work-around, I have hard-coded my actual HTML in emails within rules. For example to produce a list of issues from a Lookup Issues action:
Here is the list:
<ul>
{{#lookupIssues}}
<li><a href="{{url}}">{{key}}</a> : {{summary}}</li>{{/}}
</ul>
This means that if you could parse the linked or other formatted information from the Description, you could use HTML to recode it yourself. Quite the hassle but it might solve the problem for you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No worries, but thanks for the links and list information!
I noticed on https://codebarrel.atlassian.net/browse/AUT-2050 it mentions you can use {{issue.descriptíon.html}}. I tried it and it does work but it's adding double line spacing between each line. Maybe you have an idea?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, @Hunter1428
Great find! Two things to try:
Under the email options, I disabled "Convert line breaks to HTML line breaks" and it removed the extra line breaks when I used {{issue.description.html}}
Next, if that doesn't fully work, you could hack-up the converted HTML:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, @Bill Sheboy
Turning off "Convert line breaks to HTML line breaks" worked great!
Problem is fully solved it seems. I tested it with some emails with different format styles and so far they all worked as expected.
Thanks for the help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am glad to hear that helped!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Semi-related, the replace can be used to format tables appearing in the wiki format in large text fields like Description, to produce formatted HTML tables that appear as desired in emails. For example, adding a border, padding, and a heading row with a background:
{{customfield_10192.html.replace("<table","<table cellspacing='0' bordercolor='#B7B7B7' border='1' cellpadding='5' style='font-family:arial align:left;'").replace("'confluenceTh'>","'confluenceTh' BGCOLOR='#3A89C9'>")}}
Please forgive my poor HTML. I hope I haven't triggered anyone =o)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
Just wanted to share, that disabling the "Convert line breaks to HTML line breaks" also solved some problems I was having.
My issue was that the HTML Email was correct in terms of content and font/color - but there were huge blocks of br being inserted and spacing things down the page way too far.
Unticking this option and it looks exactly as expected when opened in the browser as an html file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am trying this in non cloud version (our company just puts JSD Server in our cloud, not Atlassian)
Anyway I have the description of the issue with a url that if I click on that in the issue it renders an image.
I then tried sending an email by using:
{{issue.description.html}} and it did not render an image at all (not even a dead link)
Also disabling line breaks in an HTML format makes for a paragraph instead of neatly spaced lines, so leaving that checked for now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.