How to create a Jira Issue from External database

Hi,

My Client is dumping all error details in a Oracle Database from various application and systems they have. I need to create JIRA Issue for each of those error records in that Oracle Database. There are various options I am Exploring:

  1. Use JIRA Issue Collector
  2. Use JIRA API

For using the first option, by calling the javascript, I see that it provides a javascript that can be launched from the a web application. We need this operation to be done in the backend by something that runs scheduled or so. So, this option is kind of ruled out.

For Using JIRA API, what are the APIs available? How can call this API, say from a database by passing parameters? I am thinking I will need to create a middleware java program to pull these records from the database. But what is that peice that I need to build at the JIra end and how do I expose it to this java program to call and create the issue? Or is there something available out of the JIRA that I can call from a middleware by passing parameters. My client has Oracle OSB middleware. Can we call soemthing from this layer to create Jira Issue?

3 answers

0 votes

There's two basic approaches.

1. Write a plugin for Jira, or create Jelly scripts. This is reasonably easy until you get to the part about transmission - how does this *know* that there is data to be imported? Do you run it regularly and execute some form of search? Does it need to listen for messages on some form of bus/queue etc?

2. Probably the better option - write something outside Jira that can poke the data in. Jira exposes a REST interface which is ideal for this - you can use whatever language / system you have available (as long as it can issue REST calls) to enter the data whenever you need it. Java, c, python, shell scripts, I've even seen this done with database triggers.

For REST, have a look at https://developer.atlassian.com/display/JIRADEV/JIRA+REST+API+Tutorials and https://docs.atlassian.com/jira/REST/latest/

JIRA Command Line Interface (CLI) has the runFromSql action which can create issues from information in a database. Or you can script individual createIssue actions. However, you probably need some external scripting to collect the data in an easier to deal with format with some queuing protocol so you can track what has been done and differentiate from new requests. You need to be careful to not miss data and not have duplicates. I have done this with a simple database table as the queue with timestamps and done flags etc... . Whatever you do, make sure you can track and log everything that is done up front or you will regret it later :).

Thanks Bob and Nic for the options. Will check the JIRA Command Line Interface (CLI) option as it sounds more compatible with the requirement that I have. Thanks again!!

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,986 views 12 18
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot