Hi,
I am using ScriptRunner to send an email when an issue is created.
In the email I would like to add a button which links to the issue, is there something like
${issue.description}
but to obtain the issue URL?
Appreciate the help!
Joe
Hello @Joe Charman
It should be straightforward, you can get the base URL using
def baseurl = com.atlassian.jira.component.ComponentAccessor.getApplicationProperties().getString("jira.baseurl")
Just append the following to the base_url
complete_URL = base_url + "/browse/" + ${issue.key}
complete URL is the final URL which the end-user can click in the mail and land on the issue.
Thank you Tarun,
I didn't quite get the base url identifier to work, but it's all fixed as I have used the following instead:
<a href="http://URL/browse/${issue.key}" class="button">View</a>
Which links directly to the issue.
Thanks for your help, - Joe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Joe Charman
Glad to know that it's working, please accept/upvote the answer so that others are helped as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
jira.baseurl does not returns the whole URL including the query string (parameters). Any ideas how to achive this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try the below code in script console to see the JIRA Base URL value. But you should have Admin privileges.
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.config.properties.APKeys
log.warn(ComponentAccessor.getApplicationProperties().getString(APKeys.JIRA_BASEURL))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.