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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.