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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.