Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Get Current Issue URL for Script Runner



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 



but to obtain the issue URL?


Appreciate the help!


2 answers

1 accepted

7 votes
Answer accepted

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

Tarun Sapra Community Leader Sep 27, 2018

Hello @Joe Charman

Glad to know that it's working, please accept/upvote the answer so that others are helped as well.

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

Suggest an answer

Log in or Sign up to answer

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you