Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

What's the best way to store data in a JIRA or Confluence plugin?

Jeremy Largman
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 17, 2011

I know you shouldn't make database tables. What's the ideal solution?

5 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

5 votes
Answer accepted
Brad Baker [Atlassian]
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 23, 2011

I am going to have to correct Nick Muldoon here.

ActiveObjects is defintely the way of the future BUT it is not supported for use by plugin developers in JIRA 4.4. It will be 'truly' supported for plugin developers to use in JIRA 5.0

We are taking a cautious approach here because we want to prove this technology before we recommend it for wide scale adoption.

For example Green Hopper will be taking advantage of it soon but its an in house plugin and we can re-act to problems and change APIs etc as we discover issues.

So while a version of ActiveObjects will ship in JIRA 4.4, it is not supported for use by non Atlassian plugins.

I do not know of the Confluence teams plans for integrating ActiveObjects but I will get them to make a statement here about their plans

In the the mean time, SAL has the concept of PluginSettings and these should be used to store plugin data.

http://docs.atlassian.com/sal-api/2.6.0/sal-api/apidocs/com/atlassian/sal/api/pluginsettings/package-summary.html

I would encourage plugin developers to check out Active Objects and give us feed back on its design. Its been in JIRA 4.4 since milestone 5.

I also appreciate the irony of asking plugin developers to 'check it out' and at the same time telling you not to use it. But Atlassian prides itself on being an "open company, no bullshit"

8 votes
Nicholas Muldoon
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 19, 2011

Starting development on a new plugin? Use ActiveObjects to store the data. One caveat, if you want to be compatible with JIRA 4.3 or Confluence 3.5 then ActiveObjects probably isn't for you as it isn't bundled in those or earlier versions.

Existing plugins such as GreenHopper will move over to ActiveObjects once JIRA 4.4 has been released.

0 votes
MattS
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 21, 2012

My Practical JIRA Plugins book has a note about this:

"The Atlassian Shared Access Layer (SAL) does provide a general class named PluginSettings that can be used by all Atlassian plugins for storage. In the case of JIRA it's just a thin layer over PropertySet. A little more information about this can be found at http: //blogs.atlassian.com/developer/2009/01/post_1.html but it will be likely replaced by the Active Objects plugin in future releases of JIRA." (p.79)

but right now I still see new JIRA 5.0 plugins from Atlassian using PluginSettings for simple configuration data. I suspect the two approaches will continue to coexist for a good while yet.

0 votes
Ulrich Kuhnhardt
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 21, 2012

@Cheryl - there is also the great blog post on SAL that you've written some time ago. Very helpful source!

CherylC May 21, 2012

Thanks Ulrich!

0 votes
CherylC May 27, 2011

By the way, when working with plugin data, you might find it helpful to use a plugin I made for ShipIt (Atlassian's hackathon). The Plugin Data Editor for JIRA, Confluence, Bamboo, and FishEye/Crucible lets you lookup values stored with SAL's PluginSettings at <baseurl>/plugins/servlet/pde. Note that it is for development use only. (If people find it useful I may add more features.)

EDIT: this plugin has been integrated into the Atlassian Developer Toolbox

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events