Add issue hyperlink into custom email

Is it possible to add a hyperlink to the issue within a custom post function email template?

4 answers

1 accepted

2 votes
Answer accepted

Hi Matthew,

Did you write you own email template ? In this case, the template get some Jira variables from the event that calls this template, and you can build the link into your mail template with the Jira url (and issue key) :

#set($baseUrl = $params.get("baseurl"))

<a href="$baseUrl/browse/$issue.key">Link text</a>

<a href = "${baseurl}/browse/${issue.getKey()}">${issue.getKey()}</a>.</td></tr>

The base url is in the binding as baseUrl, so you would use ${baseUrl}, not baseurl as in the other answers.

My answer is specific to the script runner plugin, I think the other answers are applicable to velocity templates in jira.

We are struggling to get the post function to send en email containing the hyperlink for the issue. We have the syntax as follows:

 <a href = "https://alsacjira.alsac.local:8443/browse/${issue.getKey()}">${issue.getKey()}</a>

We are getting the email with some text we sent, but no hyperlink as expected.....

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 13, 2019 in Marketplace Apps

Marketplace Spotlight: Marketing apps for Confluence to keep your teams working on the same page


244 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you