I would like to offer a menu option for admins in JIRA to update a table in Jira DB related to Service Desk.
Any open source repo or link to a plugin tutorial that could cover this?
Thanks in advance,
Action Logic:
There is no way to write to a table of some other plugin using JIRAs db interface Active Objects because AO is sandboxed. There are however several ways to use components of other plugins, which write, read and update those tables. We can assume that if there is a table, there must be some component which manages it.
so in example if you have a table which contains Service Desk information there is probably some Manager which can write, read and update that table. The main task would be to make that Manager available in your action.
If the components of SD plugin are public and have an interface (very likely) then one could use the component-import mechanism to get them into your own plugin.
https://developer.atlassian.com/jiradev/jira-architecture/building-jira-add-ons/jira-plugins2-overview/jira-plugin-module-types/component-import-plugin-module
https://answers.atlassian.com/questions/198581
If this cannot be worked out, one could consider to set up a pluginArtifact.
https://developer.atlassian.com/docs/developer-tools/working-with-the-sdk/about-amps-build-options/amps-build-configuration-reference#AMPSBuildConfigurationReference-pluginArtifacts
https://developer.atlassian.com/docs/developer-tools/working-with-the-sdk/about-amps-build-options/amps-build-configuration-reference#AMPSBuildConfigurationReference-bundledArtifacts
However that means a hard dependency between both plugins. Meaning that your plugin wont be able to activate, if SD plugin is not activated already.
If you're wanting to update data for another add-on you'll need to use it's public api. Otherwise you'll cause issues with caches and events etc. Do not go directly to the database.
Unfortunately JSD doesn't have an API yet (https://jira.atlassian.com/browse/JSD-107). The table I mean holds just the name and description of the service desk you have.
Doesn't matter, you should not write to the table.
while its legal what Daniel Wester said, i think its worth trying. It may cause problems, but must not.
Thanks a lot, this will get me started.
It looks like you're new here. Sign in or register to get started.