Get Issue URL from Post Function (ScriptRunner)

Chiara Spadavecchia February 24, 2021

Hi,

How can I get the Issue URL from post function?

  • Issue.url does not work.
  • Issue.toUrl does not work.

Is there a way to retrieve this information?

 

Thanks

1 answer

1 accepted

0 votes
Answer accepted
Kate Kabir
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.
February 24, 2021

Hi Chiara

We have the baseURL property that we provide in the binding of the script. This means that you can create a variable to show the URL using the issue key. Example code below will do this and then log it out:

def issueURL = baseUrl + '/browse/' + issue.key
logger.info(issueURL.toString())

Hope this will helps.

Kind Regards

Kate

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events