How to display a panel from a custom field in an email with Automation?

Ashley Honeycutt April 15, 2024

I have a custom field in a project that displays a panel so it quickly draws the eye.

When this field is updated, I have automation that will email this update to certain users, however it doesn't display in the email, it just shows the markup like in the attached image.

The red box is where the Jira Automation rule uses the {{issue.customfield_xxxxx}} smart value to send an email that displays certain information from the issue in HTML format. The rest of the email and smart values display as expected, although this is the only field using the wiki-style renderer.2024-04-15_09-52-36.jpg

I'm fine with either of the following options as an end result, but I'm not sure how to get to either of them:

  1. Display the panel in the email as it appears in the issue itself
  2. Only display the text from the body of the panel, without the markup

Thank you!

1 answer

1 vote
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 15, 2024

Hi @Ashley Honeycutt - The challenge you're facing is that email is formatted as html while the custom field is formatted with markup.  You would need to perform some transformation on the field data to present it the way you want in the email.  For example, you could start with something like this:

<div style="background-color: yellow; padding: 10px;">{{issue.update.substringAfter("}").remove(" {panel}")}}</div>

I haven't tried myself, but this should extract just the update itself and place it inside a html which would give it a simple yellow background.  Play around with it for the desired result.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events