Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to Enable or Disable plugin depending on jira version?

Jarell Gabon September 1, 2019

If an admin decided to upgrade to JIRA 8. And our plugin only supports version 7, how do i check the jira version and see if the version is below 8 then allow the plugin else disable the plugin.

1 answer

1 accepted

0 votes
Answer accepted
DPKJ
Community Champion
September 1, 2019

By programmatically if you mean inside your plugin, you can this class https://docs.atlassian.com/software/jira/docs/api/8.0.0/com/atlassian/jira/util/BuildUtilsInfo.html

 

Usage is fairly straight forward,

String version = buildUtilsInfo.getVersion(); //something like to check versions.
Jarell Gabon September 2, 2019

Hi DPKJ,

thank you for your reply. Do you know how to disable the plugin if lets say version > 7?

DPKJ
Community Champion
September 2, 2019

I don't think this is possible programmatically.

Jarell Gabon September 2, 2019

if we have 2 jars, one for jira 8 and one for jira 7 how do we notify the admin when he/she upgrades from jira7 to 8 to also update our jar? Thanks @DPKJ 

DPKJ
Community Champion
September 2, 2019

When you release plugins to Marketplace, you can set compatibility of one version till Jira 7 and for other version Jira 8.x onward.

This way when someone has Jira 7 version installed and upgrade to Jira 8, without updating your plugin, UPM will tell admins to upgrade your plugin, and they also will incompatible application message too.

Many vendor in marketplace relay on this strategy so you don't need worry that much.

One more quick point, if any of your module in plugin is using resources (classes etc.) that are available in Jira 7 but has been discontinued in Jira 8, UPM will not enable that module.

Jarell Gabon September 2, 2019

Lastly, how can we set the compatibility of one jar? Is it already in marketplace or do we need to add some configs to our jar? Thanks.

DPKJ
Community Champion
September 3, 2019

You don't need to change anything in your Jar, just when you upload new version on marketplace you can set compatibility.

Something like this appear on Marketplace -

Screenshot 2019-09-03 at 12.29.27 PM.png

Like # people like this

Suggest an answer

Log in or Sign up to answer