How/where to store add-on data in jira cloud?

Hello Experts,

I want to store my custom plugin data, the plugin created using Atlassian Connect Framework. So what are the ways to store the data apart from Issue Properties and App Properties, because, if am not wrong, these two ways are having limitations of storing the values in a key? Can Single property key store multiple values?
Does anybody have experience in this?

Thanks,
Vedant

If you need something that app properties and entity properties can’t provide you will need to bring your own database.

@sven.schatter Thanks for the clarification. Then how do I implement it? Is there any documentation for that?

Thanks

1 Like

Well there’s several ways to go about this. For Dev you could use something like an in memory database depending on the language you’re using (e.g. SQLite, HSQL). Or you could even spin up the kind of DB you want to use in prod via docker.

In prod you’ll want to make use of the DBaaS offering that your PaaS provider probably has.

The Key for each issue property is a complete JSON document (up to 32KB), so if necessary you can store hundreds of values in each JSON.

Don’t forget issue fields.

@sven.schatter, What if I used traditional database like postgreSQL, to store app data ? Because in my case, app properties are not sufficient enough.

By “what if” do you mean whether that’s possible? Connect Spring Boot already comes preconfigured with HSQL anyway I believe and I’m also 90% sure that ACE also has some kind of in memory DB already set up by default. You basically just need to switch this out for PostgreSQL if you want that.

Let me explain to you the context, so I am currently storing app data in PostgreSQL using a sequelize adaptor. So I wanted to understand this an appropriate way or not? Because, if this is not as per the Atlassian standards or policies then my add-on might get rejected during validations from Atlassian end. So to save the time and implement the best practice, I asked you this question.

Sounds like you’re on ACE? I’m a Spring Boot user myself and do not have too much experience with ACE / Express in general. Did a quick Google search and from what I can tell sequelize seems to be kind of what Hibernate is for Spring Boot. Sounds pretty good to me, but you’ll probably want to find someone that actually has some experience with this.

@sven.schatter yes it’s ACE. Thanks for understanding actual problem. I will raise this question again.

Hi @vedant.kulkarni
For production, database should always be used, app properties are really meant for storing smaller chunks of data.
When generating a project, ACE creates a config.json.sample file for you, and if you have seen it, the config.json.sample has both examples for mysql and postgres.
In our projects we used mysql:

    "production": {
        "port": "$PORT",
        "errorTemplate": true,
        "localBaseUrl": "$PRODUCTION_URL",
        "store": {
            "adapter": "sequelize",
            "dialect": "mysql",
            "url": "$DATABASE_URL"
        },
        "whitelist": [
            "*.jira-dev.com",
            "*.atlassian.net",
            "*.atlassian.com",
            "*.jira.com"
        ]
    }

So continue using database and you good… :smiley:

Thanks, @Mcobanov :smiley:
This is what I needed. I will continue to use Postgresql.