App clears config permanently if the Jira process is stopped

Hi Team,
We are working on a Jira On-Prem app and have kept a plugin destroy event to handle uninstall scenario of the app to clear all the data saved in the configuration.

While testing it we observed that the if the Jira process is stopped and started again, all the data is cleared which was saved in the app configuration which is not expected as the app was not uninstalled.

Can someone take a look and help here?

This is generally not how apps behave, an uninstall is not a signal from the customer to delete their data, it’s common for customers to uninstall/reinstall apps when diagnosing problems, it happens all the time.

To clear data on uninstall would be against the customer expectations, as other apps do not do this.

You may wish to offer a “Clear all data” button somewhere, but doing it on uninstall is not the norm.

1 Like

To add to @rlander 's post. You’ll have issues when you start heading into multi node scenarios (DC) where each service can have a plugin destroyed event.

In addition to this - you really want to have the admin select to delete the data. Either through direct DB interaction (give which tables a DBA should drop) or have a “reset” button (like @rlander mentioned). I prefer the button approach and then log who the user was that mashed it (and make sure you have “Are you sure?!?!?” dialogs).


1 Like