Inside my plugin I'd like to check the JIRA version to verify the installed version of the plugin is compatible with the version of JIRA it's running on. Could anyone help me figure out how to do this?
Try com.atlassian.jira.util.BuildUtils.getVersion().
You will need the jira-core depedency.
Thanks, that one was deprecated but the API doc led me to BuildUtilsInfo which appears to have replaced that class. Exactly what I needed, thank you!!
@Chris Latimer's comment should be the correct answer, you can also get the JIRA version numbers (major, minor, maintenance) as follows:
BuildUtilsInfo buildUtilsInfo = new BuildUtilsInfoImpl(); int[] versionNumbers = buildUtilsInfo.getVersionNumbers();
It looks like you're new here. Sign in or register to get started.