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