Application Properties Returns Null Base URL

We have a single customer where
applicationProperties.getString(APKeys.JIRA_BASEURL)

Returns null, this is on Jira 8.13.4.

There isn’t a good way for us to handle this since we need to build a link for the user based on the Base URL. The link will be placed into an email, so a relative URL doesn’t work.

Any suggestions?

What if you do this?

import com.atlassian.sal.api.ApplicationProperties;
import com.atlassian.sal.api.UrlMode;
...
String uriRel = applicationProperties.getBaseUrl(UrlMode.RELATIVE))
String uriAbsu = applicationProperties.getBaseUrl(UrlMode.ABSOLUTE))

Does this work?

1 Like

I’m not sure about this one in the context of emails, but:

"${req.contextPath}/my/url" might work in .vm templates :slight_smile: