I’m pretty new to Jira plugin developlment, so I would like to make sure that I am using the right approach from the start.
My goal is to have the user open a dialog, select some value, and after that, upon closing the dialog, have that selected value be saved and associated with the current issue. What are the best practices in this scenario?
@t.neychev it depends on your platform. For Jira Server, you can either use ActiveObjects to store your own entities in the Jira database or use Entity properties (you can set properties for User, Project, Issue, etc). For Jira Cloud, you can use a database of your own liking or use the Jira REST API to store Entity properties (similar to Jira Server, but only accessible via REST API and not programmatically).
To be honest, you should probably go with Entity properties if possible. There is a lot of headache involved in ActiveObjects. Supporting all possible combinations of jira version, jdk, database type (mysql, mariadb, oracle, mssql) and database version is not a small feat.
What worries me there is that there’s an upper limit on the size of the value - 32KB. If all goes according to plan, at some point my plugin is going to have to associate issues with image files, which are going to be significantly larger.
Are you planning on storing the image files as blobs in the database? It might be better to store them on disk and only save a reference to the image file?
If you want to make your add-on available for Data Center, please make sure to use the Jira home directory, as this is the only safe place for persistent storage in DC configurations.