Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I get JIRA base URL from Groovy in JIRA7.1

Heshan Manamperi
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.
April 25, 2017

I'm using following code in one of my Groovy script to get base URL of my JIRA instance. But this has stopped working after upgrade from 6.4 to 7.1. What should changed?

def baseurl = com.atlassian.jira.ComponentManager.getInstance().getApplicationProperties().getString("jira.baseurl")

1 answer

11 votes
Jobin Kuruvilla [Adaptavist]
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.
April 26, 2017

Try

def baseurl = com.atlassian.jira.component.ComponentAccessor.getApplicationProperties().getString("jira.baseurl")

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events