How to include a clickable link in an email from Jira

Danilo Simic October 12, 2023

Hello everyone,

I am trying to do the following:

  1. Using automation send an email with some field values
  2. The custom field called "Release Notes" (rich text field) sometimes contains a link
  3. When the email is sent that link from the "Release Notes" field should be clickable

Actual outcome:

  1. Email is sent with all needed field information
  2. Link from the field "Release Notes" is displayed as text and is not clickable

 

I tried changing the render settings of the field in Jira but the outcome was the same.

I also tried using the "href" option to try and include the text from the field like this: <a href="{{issue.Release Notes}}">{{issue.Release Notes}}</a>
This did nothing and no information from that field was included in the email.

 

We are sending the email as HTML.Capture.PNG

 

And here is the HTML template we are using:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html lang="en" xml:lang="en" style="font-family: Arial, sans-serif"><head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title></title>

   <!--[if !mso]><!-->

  <meta http-equiv="X-UA-Compatible" content="IE=edge"> <!--<![endif]-->

  <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!--[if (gte mso 9)|(IE)]>

        <style type="text/css">

            table {border-collapse: collapse;}

        </style>

        <![endif]--> <!--[if mso]>

        <style type="text/css">

            body, table, td {

                font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif !important;

                color: #202020 !important;

            }

        </style>

        <![endif]-->

<style type="text/css">

.button:hover {

background: #0083C0 !important;

}

div.issue-key a:hover {

color: #444444 !important;

}

div.issue-summary a:hover {

color: #0083C0 !important;

}

span.field a:hover {

color: #0083C0 !important;

}

</style>

</head>

<body style="background-color: #ffffff; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; font-size: 14px; font-style: normal; font-weight: 400; color: #202020; letter-spacing: -0.15px; color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 1.4285715; background-color: #ffffff; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; color: #202020; letter-spacing: -0.15px" bgcolor="#ffffff">

<div class="outer-container" style="width: 100.0%; table-layout: fixed; max-width: 800px; margin: 0 auto; -webkit-text-size-adjust: 100.0%; -ms-text-size-adjust: 100.0%"> 

<table style="border-spacing: 0; margin: 0; border-collapse: collapse; width: 100.0%; border-spacing: 0; margin: 0; margin: 0 0 0 0">

<tr><td style="padding: 0; padding: 10px 0 20px 0; vertical-align: top;">

<span class="summary">A new software version is available.</span>

</td></tr>

<tr><td style="padding: 0; padding: 0; vertical-align: top; border-top: 2px solid #dddddd; padding:10px 0 0 0">

<div class="issue-key" style="font-weight: normal; margin: 0;"><a href="{{issue.url.customer}}" style="color: #666666; text-decoration: none; color: #666666;">{{issue.key}}</a></div>

</td></tr>

<tr><td style="padding: 0; padding: 0; vertical-align: top;">

<div class="issue-summary" style="font-size: 20px; font-weight: 600; line-height: 20px; margin: 0 0 0 0"><a href="{{issue.url.customer}}" style="color: #0095DA; text-decoration: none; color: #0095DA;">{{issue.summary}}</a></div>

</td></tr>

</table>

<table style="border-spacing: 0; margin: 0; border-collapse: collapse; width: 100.0%; border-spacing: 0; margin: 0; margin: 20px 0 0 0">

<tr>

<td style="padding: 0; padding: 0; white-space: nowrap; width: 1.0%; vertical-align: top; padding-right: 5px; line-height: 24px; color:#666666">Due date:</td>

<td style="padding: 0; padding: 0; line-height: 24px"><span class="field" style="max-width: 700px; height: auto; display: inline-block; padding: 0 4px">{{issue.Planned end}}</span></td>

</tr>

<tr>

<td style="padding: 0; padding: 0; white-space: nowrap; width: 1.0%; vertical-align: top; padding-right: 5px; line-height: 24px; color:#666666">Reporter:</td>

<td style="padding: 0; padding: 0; line-height: 24px"><span class="field" style="max-width: 700px; height: auto; display: inline-block; padding: 0 4px">{{reporter.displayName}}</span></td>

</tr>

<tr>

<td style="padding: 0; padding: 0; white-space: nowrap; width: 1.0%; vertical-align: top; padding-right: 5px; line-height: 24px; color:#666666">Status:</td>

<td style="padding: 0; padding: 0; line-height: 24px"><span class="field" style="max-width: 700px; height: auto; display: inline-block; padding: 0 4px">{{issue.status.name}}</span></td>

</tr>

<tr>

<td style="padding: 0; padding: 0; white-space: nowrap; width: 1.0%; vertical-align: top; padding-right: 5px; line-height: 24px; color:#666666;">Description:</td>

<td style="padding: 0; padding: 0; line-height: 24px"><span class="field" style="max-width: 700px; height: auto; display: inline-block; padding: 0 4px">{{issue.description}}</span></td>

</tr>

<tr>

<td style="padding: 0; padding: 0; white-space: nowrap; width: 1.0%; vertical-align: top; padding-right: 5px; line-height: 24px; color:#666666;">Release notes:</td>

<td style="padding: 0; padding: 0; line-height: 24px"><span class="field" style="max-width: 700px; height: auto; display: inline-block; padding: 0 4px">{{issue.release notes.text}}</span></td>

</tr>

<tr>

<td style="padding: 0; padding: 0; white-space: nowrap; width: 1.0%; vertical-align: top; padding: 20px 5px 0 0; line-height: 24px; color:#666666">CDNs:</td>

<td style="padding: 0; padding: 0; line-height: 24px"><span class="field" style="max-width: 700px; height: auto; display: inline-block; padding: 20px 4px 0 4px">{{issue.cdn}}</span></td>

</tr>

<tr>

<td style="padding: 0; padding: 0; white-space: nowrap; width: 1.0%; vertical-align: top; padding-right: 5px; line-height: 24px; color:#666666">Priority:</td>

<td style="padding: 0; padding: 0; line-height: 24px"><span class="field" style="max-width: 700px; height: auto; display: inline-block; padding: 0 4px">{{issue.priority}}</span></td>

</tr>

<tr>

<td style="padding: 0; padding: 0; white-space: nowrap; width: 1.0%; vertical-align: top; padding-right: 5px; line-height: 24px; color:#666666">Risk level:</td>

<td style="padding: 0; padding: 0; line-height: 24px"><span class="field" style="max-width: 700px; height: auto; display: inline-block; padding: 0 4px">{{issue.risk level}}</span></td>

</tr>

<tr>

<td style="padding: 0; padding: 0; white-space: nowrap; width: 1.0%; vertical-align: top; padding-right: 5px; line-height: 24px; color:#666666">Components:</td>

<td style="padding: 0; padding: 0; line-height: 24px"><span class="field" style="max-width: 700px; height: auto; display: inline-block; padding: 0 4px">{{issue.components for update}}</span></td>

</tr>

<tr>

<td style="padding: 0; padding: 0; white-space: nowrap; width: 1.0%; vertical-align: top; padding-right: 5px; line-height: 24px; color:#666666">Business Case:</td>

<td style="padding: 0; padding: 0; line-height: 24px"><span class="field" style="max-width: 700px; height: auto; display: inline-block; padding: 0 4px">{{issue.business case}}</span></td>

</tr>

<tr>

<td style="padding: 0; padding: 0; white-space: nowrap; width: 1.0%; vertical-align: top; padding: 20px 5px 0 0; line-height: 24px; color:#666666">Update procedure:</td>

<td style="padding: 0; padding: 0; line-height: 24px"><span class="field" style="max-width: 700px; height: auto; display: inline-block; padding: 20px 4px 0 4px">{{issue.work procedure}}</span></td>

</tr>

<tr>

<td style="padding: 0; padding: 0; white-space: nowrap; width: 1.0%; vertical-align: top; padding-right: 5px; line-height: 24px; color:#666666">Rollback procedure:</td>

<td style="padding: 0; padding: 0; line-height: 24px"><span class="field" style="max-width: 700px; height: auto; display: inline-block; padding: 0 4px">{{issue.rollback procedure}}</span></td>

</tr>

<tr>

<td style="padding: 0; padding: 0; white-space: nowrap; width: 1.0%; vertical-align: top; padding-right: 5px; line-height: 24px; color:#666666">Test Plan:</td>

<td style="padding: 0; padding: 0; line-height: 24px"><span class="field" style="max-width: 700px; height: auto; display: inline-block; padding: 0 4px">{{issue.test plan}}</span></td>

</tr>

<tr>

<td style="padding: 0; padding: 0; white-space: nowrap; width: 1.0%; vertical-align: top; padding: 20px 5px 0 0; line-height: 24px; color:#666666">Proposed Schedule:</td>

<td style="padding: 0; padding: 0; line-height: 24px"><span class="field" style="max-width: 700px; height: auto; display: inline-block; padding: 20px 4px 0 4px">{{issue.proposed schedule}}</span></td>

</tr>

<tr>

<td style="padding: 0; padding: 0; white-space: nowrap; width: 1.0%; vertical-align: top; padding-right: 5px; line-height: 24px; color:#666666">Approved Schedule:</td>

<td style="padding: 0; padding: 0; line-height: 24px"><span class="field" style="max-width: 700px; height: auto; display: inline-block; padding: 0 4px">{{issue.approved schedule}}</span></td>

</tr>

<tr>

<td style="padding: 0; padding: 0; white-space: nowrap; width: 1.0%; vertical-align: top; padding: 20px 5px 0 0; line-height: 24px; color:#666666">Customer Impact:</td>

<td style="padding: 0; line-height: 24px"><span class="field" style="max-width: 700px; height: auto; display: inline-block; padding: 20px 4px 0 4px">{{issue.customer impact}}</span></td>

</tr>

<tr>

<td style="padding: 0; padding: 0; white-space: nowrap; width: 1.0%; vertical-align: top; padding-right: 5px; line-height: 24px; color:#666666">Component Impact:</td>

<td style="padding: 0; padding: 0; line-height: 24px"><span class="field" style="max-width: 700px; height: auto; display: inline-block; padding: 0 4px">{{issue.component impact}}</span></td>

</tr>

</table>

<table style="border-spacing: 0; margin: 0; border-collapse: collapse; width: 100.0%; border-spacing: 0; margin: 0; margin: 0 0 0 0">

<tr><td style="padding: 0; padding: 0; vertical-align: top; border-bottom: 2px solid #dddddd; padding:20px 0 20px 0">

<div class="layout-action-button media-print-hidden" style="margin: 0">

<a class="button" href="{{issue.url.customer}}" style="color: #ffff; text-decoration: none; align-items: baseline; box-sizing: border-box; border-radius: 4px; border-width: 0; display: inline-flex; font-style: normal; font-size: inherit; font-weight: 600; height: 2.2857144em; line-height: 2.2857144em; margin: 0; outline: none; padding: 0 12px; text-align: center; transition: background 0.1s ease-out, box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38); user-select: none; vertical-align: middle; white-space: nowrap; background: #0095DA; color: #ffffff; text-decoration: none; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; font-size: 14px; padding: 0 38px">View ticket</a>

</div>

</td></tr>

</table>

<table style="border-spacing: 0; margin: 0; border-collapse: collapse; width: 100.0%; border-spacing: 0; margin: 0; margin: 0 0 0 0">

<tr><td style="padding: 20px 0 0 0; padding: 20px 0 0 0; vertical-align: top; font-size: 13px;">

<span class="summary">Reply to this email or update release ticket in order to adjust scheduled time for update.</span>

</td></tr>

<tr><td style="padding: 0; padding: 20px 0 20px 0; vertical-align: top; font-size: 13px;">

<span class="summary">Best regards,<br>United Cloud Team</span>

</td></tr>

</table>

</div>

</body>

</html>

1 answer

1 accepted

0 votes
Answer accepted
Dag Atle Stenstad
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 13, 2023

Hi @Danilo Simic To render HTML, add .html to the end of a field. For example, {{issue.description.html}}

Convert wiki markup to HTML or plain text in Jira automation | Cloud automation Cloud | Atlassian Support

Danilo Simic October 16, 2023

This did the trick. In the HTLM template I added the ".html" and everything was sorted out.

 

I was so focused on encoding and somehow including a link that I did not try this simple solution. Thank you very much.

Like Dag Atle Stenstad likes this
Danilo Simic October 16, 2023

Maybe one thing to note for others. The render style of the fields was left on Wiki style. Not sure if this also affects the links in the email.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events