Strategy for Importing ~100k attachments and comments into JIRA - Jelly/Groovy/Rest API?


I need to import around 100k issues from another ticketing system into JIRA, each issue having their own attachments and comments. What would be the best strategy with respect to performance? Attachment files are available on disk, Comments will be in a csv (Columns for commentor user, date, comment)

Option 1: Jelly - Using Java, write a Jelly executable file which will be using the Jelly tags AttachFile and AddComment. Then execute the Jelly file 

Option 2: Groovy - GroovyRunner to execute Groovy files which have code for Attach and Comment

Option 3: REST API - Java code to call POST methods for Comment and Attachment

Break the 100k issues into batches of couple of 1000 at a time.

What would be the best approach - simplicity, performance, reuse? Are there any other ways I can simplify my task? Thanks in advance.


5 answers

1 accepted

1 vote

I would convert your data into json and use the json importer. This gives you most flexibility, and unlike the other suggestions, can handle bringing issues directly into the "closed" state for instance.


Thanks @Jamie Echlin [Adaptavist] . I have observed pluses and minuses for each of the other strategies 1. REST API - Though its the best wrt the performance, I cannot specify the userid of the commenter or the person who is attaching the file to an issue in the POST body. 2. Jelly - Ease of use, and I can specify the commernter userid but not the userid for attachment. As for your suggestion for converting to json, I will be doing the actual issue import thro the Excel import. But Json is good, that I can specify the username of the commenter and the person attaching a file in the json data. I will do a stress test of how much comments/attachments can be added in a json file for import. Do you have any recommendations in terms of the performance of the json import? any max json import file size limit?

CSV import should also work well. I don't think there should be a max file size, within reason. Performance will probably be the same as a csv import.

The reason I am not using CSV for attachments and comments, as I may have hundreds of comments on some issues and I don't want to create so many columns, plus I really like the clean approach of json. Anyway I will try out both the options.

1 vote
Pedro Cora Atlassian Team Jun 11, 2015

I'd go with REST calls on a script that can be reused more easily.


-- Pedro

The native JIRA REST/SOAP API (we have used JIRACLI for this one) will give you simplicity, performance and reuse. 

I can attest to this because we have a very large JIRA instance which has many integrations with different applications. Some of those apps use JIRACLI to create hundred of issues with attachments/comments. We also have ALM QC ORASI Adopter which does the same for the HPQC tool. Other CI tools that integrate with us use the native apis too.

Thanks everyone. I am more inclined to the Rest APIs as well.

Suggest an answer

Log in or Join to answer
Community showcase
Alexey Matveev
Published Saturday in Jira

How to run Jira in a docker container

Everything below is tested on Ubuntu 17.10. I prefer to use Jira in a docker container because: 1. I can install Jira with a couple of commands. 2. I can start and stop Jira just by starting and s...

292 views 6 8
Read article

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