Seems like an easy one, but I'm at a loss. What's the most intelligent way for an addon (or ScriptRunner groovy script) to determine what version of JIRA Software is currently installed?
In ScriptRunner, the following script will get the current version:
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.application.JiraApplicationManager ComponentAccessor.getComponent(JiraApplicationManager.class).getPlatform().getVersion()
Update:
Probably a better implementation using the BuildUtilsInfo class:
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.util.BuildUtilsInfo ComponentAccessor.getComponent(BuildUtilsInfo.class).getVersion()
Thanks Gareth, this is perfect! I was having trouble tracking down the most-recent way to do it since the 7.0 launch of JIRA.
Much appreciated!
It looks like you're new here. Sign in or register to get started.