I know about
import com.onresolve.scriptrunner.runner.util.OSPropertyPersister def pluginSettings = OSPropertyPersister.getPluginSettings() def key = "key" def value = "my-value" // save value against key pluginSettings.put(key, value) // retrieve value for key def savedValue = pluginSettings.get(key)
But is there any other way to store data for later use in scripts? For example suppose I have a counter which is incremented for a specific kind of issue and I want to read it later...
Hi there,
I presume this data you wish to store is not in context of An issue or A project, but rather for the whole instance?
In that case, have you considered adding a table tot the Jira (or other accessible) database?
From groovy you could then access this data, this KB article should help you on your way:
https://scriptrunner.adaptavist.com/4.3.4/jira/recipes/misc/connecting-to-databases.html
Let me know if this helps!
Regards,
Jeroen
This is exactly what I am looking for. Is there a suggested way or guideline to add tables tot Jira database?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Just creating tables in the Jira DB is strongly discouraged, since Jira will probably ignore these tables during upgrades etc ...
https://community.atlassian.com/t5/Jira-Core-questions/How-to-insert-a-custom-table-to-JIRA-DB/qaq-p/424568
A few options:
Regards,
Jeroen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.