Manually enable User installed plugins (not from administrative console)

Yoni Danos January 30, 2013

Hi,

is there a way to mannually enable plugins in JIRA?

is there a configuration file or something?

Thanks,

Yoni

3 answers

1 accepted

1 vote
Answer accepted
Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 2, 2013

UPM does a REST call to enable/disable plugins. Calls are done to <jira url>/rest/plugins/1.0/<plugin key>. The content contains info about all the modules. Please try doing a sample enable/disable using browser and check the details of the PUT request being done.

fsim
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 25, 2014

Content-Type should be application/vnd.atl.plugins.plugin+json

And the JSON payload can be something like this:

{ "enabled": false }

1 vote
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 30, 2013

No.

As a general rule, configuration files are read as something starts up. For the system side of it, this means you restart Jira if you need to amend config files. If you're looking at plugins, it's catch-22 - you need to re-read a changed config file, and in order to do that, you need to, um, restart the plugin.

There are no methods exposed via REST, SOAP etc that I know of, or can find at a glance.

So, I suspect your options are:

  • Do it in the UI
  • Write a wget/curl/post thingy that pretends to be using the UI as you'd normally click.
  • Write a plugin that exposes the functionality you need so you can call it in another way.
Yoni Danos January 30, 2013

Thanks for the answer,

but do you know where the config file located and what's his name?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 30, 2013

Sorry, not enough coffee this morning.

Most, if not all, of the plugin enabled/disabled state is controlled by entries in the database. You could change these using SQL, but

1. Some plugins need to know they are being enabled/disabled - Greenhopper for example. Changing their state in the database can break them

2. You MUST have Jira down while you change data using SQL, even for a minor change like this. If Jira is running, then your change may well be completely ignored, or, more frighteningly, trash your setup.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 30, 2013

Which config file? I was talking in generalisations, I'm not sure which config file you're looking for.

Yoni Danos January 30, 2013

Thanks again for the answer,

more questions

  • what do you mean by breaking them?
  • do you know in which table should I look?

We use Oracle DB

Yoni

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 30, 2013

By breaking, I mean data loss and having to remove them and put them back, re-indexing, and having to repair bits of your database. I really can't recommend using the UI to do this instead of trashing your data.

I'm curious though - what makes you want to do this? Enabling and disabling plugins in the UI is quick and I can't think of a good use-case for doing it by hacking. It's not worth the effort as far as I can work out.

0 votes
childnode February 10, 2016

as answered a minute ago in How to Enable Disabled Plugins in JIRA:

the pluginstate is saved in the database and has it's own table, called ... pluginstate *wohoo*

Example for an postgreSQL DB:

jiradb=# UPDATE pluginstate SET pluginenabled=true WHERE pluginkey='com.atlassian.jira.jira-quick-edit-plugin';
so: you need the technical key for the plugin (see your startup log) and enable / disable what you want there.
warning don't do this on productive nor in running systems wink

Suggest an answer

Log in or Sign up to answer