How to get resource that is outside of the plugin

I’m developing a plugin for internal use that needs to take non-working days into account. As I don’t have access to non-working days of a board, I’ve decided to add my own configuration file and read from it. But I need to put it into somewhere inside jira configuration folders so that I can change the contents upon need. If I put it inside the bundle, that would mean the same thing as hardcoding. What is the correct way to read a resource that is outside of the plugin bundle and what would be the best place to put it?

Use the JiraHome class to retrieve instance specific filesystem paths:

Based on that info, you can create a filesystem link to your file and read/write it inside your plugin.

1 Like