Hi,
We are using Automation for JIRA SD cloud and I have currently setup alert email notifications that are set to be HTML. I'm using {{issue.comments.last.body}} within the body of the email and it is not coming through correctly even though everything is set as HTML. Only the {{issue.comments.last.body}} field appears to have this issue. The email come through ok with the other components but as soon as that field value is placed within the email it is showing all HTML tag/formatting as text for any values of that field.
Have you seen this before?
Thank you,
Larry
Very late comment on this item but I came across it whilst faced with the same issue. In case someone else follows the same path, I ended up using the below which worked as expected:
{{issue.comments.last.body.html}}
NB I needed to uncheck "Convert line breaks to HTML line breaks" to ensure spacing was as desired.
Are your emails displaying something like this?
{color:#fdsgds} Hi there {quote}
{quote} {quote}
When it should look like this:
Hi there
If that's the issue you're having, I'm having the same thing and ended up using
{{issue.comments.last.body.replaceAll("\{.*?\}","")}}
That just replaces anything surrounded with { } and it's contents. Works for us as long as no one uses curly braces in their email (which I've never seen before)
Cheers!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I haven't seen this before but mail clients showing HTML source rather than processed HTML usually occurs if the HTML isn't valid.
Since the comment is used directly by default, you could try escaping the comment? Something like:
{{#htmlEncode}}{{issue.comments.last.body}}{{/}}
should do the trick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reply Mark,
I gave this a shot and unfortunately it was still coming through in the same manner. I've just changed everything to standard text for now to clean it up.
Cheers,
Larry
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.