Forums

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

Can I do anything when I enable my plugin?

Влад Демидик July 6, 2018

Hello!
I need to fill some settings in DB once. Can i do it when someone click on enable button?

Thanks :)

1 answer

1 accepted

0 votes
Answer accepted
Alexey Matveev
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.
July 6, 2018

Hello,

Do you mean that you are developing a custom plugin for Jira Server/Data Center and you want to do some action, when your plugin has been enabled?

If so, then you have two choices:

1.  Use afterPropertiesSet() method. You can find more info here:

https://community.atlassian.com/t5/Marketplace-Apps-questions/Jira-plugin-quot-afterPropertiesSet-quot-and-quot-destroy-quot/qaq-p/97321

2. Use plugin lifecycle. You can find more info here:

https://community.atlassian.com/t5/Answers-Developer-Questions/onStart-from-com-atlassian-sal-api-lifecycle-LifecycleAware-is/qaq-p/509824

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events