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

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>

2 votes

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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

263 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