I would like to create Project settings Page for my Jira Plugin (jira:projectSettingsPage module).
Is there an example code how to do this?
I am mostly interested in how (or where) do I store the setting value (in my case just one enum for now, but in the future it can be text or numerical value), and how do I get this value later in the plugin code.
I am currently using UI Kit (for now)
Iām struggling to understand the scope of the storage API. I have a plugin, that can be installed on different Jira projects, that can again belong to different Sites.
If I store something in the Storage, is the value stored unique for the project, site or the whole plugin (across all projects and sites)?
It says here: https://developer.atlassian.com/platform/forge/runtime-reference/storage-api/
āData stored using the Storage API isnāt shared between Forge apps on the same site or across different Atlassian sites.ā
That is reffereing to ādifferent Forge appsā but what about same app. If I have same app installed on two projects or sites, is the storage shared?
Obviously, since I am implementing āprojectSettingsPageā I would like to have project specific settings, so storage should not be shared. Do I need to us project specific key for this?
You plugin will be installed for a Jira instance (site), not per project. Then when the projectSettingsPage is called, you get the project key as a context parameter. I guess you should use project key as key in set and get from storage API. Then you store a project specific information to the storage API.
Regarding your question on the scope of Forge storage, your app has a separate region of storage for each tenant in order to ensure tenants are isolated from one another. This means you can use project IDs as storage keys knowing they will be unique within a given tenant storage area.
āData stored using the Storage API isnāt shared between Forge apps on the same site or across different Atlassian sites.ā
That is reffereing to ādifferent Forge appsā but what about same app. If I have same app installed on two projects or sites, is the storage shared?
This is referring to the same app. Or another way of putting this is each {tenant, app} combination gets a separate Forge storage area.
And just to be extra clear, in addition to the tenant isolation I pointed out above, this scheme also keeps storage isolated between apps.
Thank you both for a helpful information.
Just to clarify the terminology, because there are few floating around. I assume that tenant = Organisation = site = instance.
Since weāre clarifying, the developer community will agree with 3 out of 4 of your equivalencies: tenant = site = instance. I think Atlassian prefers the term site.
However, āorganizationā is a special concept; a āsuper tenantā if you will. For most small customers, there is a 1:1 between their organization and their site. But for our largest, enterprise customers the organization is a thing that aggregates multiple sites. Sites have content like issues in projects, and pages in spaces. Organizations have the shared set of people and groups that are used to control access across all the content.
You didnāt use the term āorganizationā in this thread so thereās no misunderstanding here. But itās an easy term to miss around Atlassian because it doesnāt quite mean what many people think it means (ie your original assertion that org = site).