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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to insert a custom table to JIRA DB ?


3 answers

3 votes

Please, don't.  It's a pain in the neck to maintain, you will need to write piles of code to be able to use it, and JIRA will still ignore it on migration and upgrade.

What is the actual requirement that led you to this (very bad) idea?

crf Atlassian Team Nov 05, 2015

As Nic said, just plain don't. This is what Active Objects is for. It isn't perfect, but at least it's supported.

We want to create tasks and subtask automatically from another sytem via web servis. We have different task types and different subtask types according to tasks type.

When we create tasks and subtasks, we need to know which subtask types are connected to task type. So we need to keep a mapping table.

After we received some comment from here, we decided to keep our mapping another DB.



>We want to create tasks and subtask automatically from another sytem via web servis. Ok, that does not need any new table or even mapping. Keep it simple - create the issues in JIRA via REST and add a custom field (not editable by users) that stores the extra mapping data you think you need.

Agree with Nic.

1 vote
Mike Rathwell Community Leader Nov 06, 2015


I agree with what Nic says. Just... don't.

What I recommend (and have done) in both JIRA and Confluence is to add ANOTHER datasource to tomcat. If you need another whole table for whatever reason and/or want, perhaps, more functionality even that JUST what a table provides, another datasource can do the trick for you. You're going to have to do some scripting or use other plugins to render the data anyway from a custom table and (at least the ones I use) allow specifying the datasource.

Lemme know if this gets you along the way and feel free to ask more questions if this seems like the direction to go


@Mike Rathwell, do you have any more code or examples of doing this? I would be interested in being able to show data from another datasource in a custom field in a ticket upon ticket creation but I know there is potentially a lot of ways of doing this. I would love to learn more about how JIRA could be made to use other datasources at the same time its say using mysql for its DB. Thank you

Another alternative to adding a Datasource to Tomcat would be via the SQL for JIRA plugged tables feature: It allows to plug tables into the SQL for JIRA data model by providing a basic JIRA plugin. There is available a complete example with source code and even a video here:

The advantages of this approach is that you can combine your custom data with JIRA data via standard SQL.

For instance: You might want want to add some data from an external datasource ( not necessarly a relational database, it could be an Excel file, REST service, etc). Then plug your data via MYTABLE 

In this way you would be able to perform a SQL statement like:

select * from MYTABLE

If your table contains issue-related data (an issue key column for instance) then you could perform a SQL like:

select * from MYTABLE t inner join ISSUES i on i.key=t.issue_key 

This approach has additional advantages as there are free extensions on the Markeplace to show those queries as custom fields

reporting, business analysis or built other JQL queries based on.

It might sound a bit complex now, for sure, bit it is a quite easy, flexible, powerful, long term, integrated and able to scale way solution. 




Why do you need it?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Marketplace Apps & Integrations

Bitbucket Smart Commits vs. Genius Commits - What's the difference?

If you already heard about Smart Commits in Bitbucket, know that you just stumbled upon something even better (and smarter!): Genius Commits by Better DevOps Automation for Jira Data Center (+ Server...

106 views 0 2
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you