Add issue hyperlink into custom email

m
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 18, 2012

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

4 answers

1 accepted

5 votes
Answer accepted
Bastien
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 18, 2012

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>

4 votes
Sreenivasaraju P
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 18, 2012

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

2 votes
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 18, 2012

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.

0 votes
Belinda Tinsley July 20, 2017

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
TAGS
AUG Leaders

Atlassian Community Events