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

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 Sign up to answer
Community showcase
Published Mar 14, 2019 in Jira

Updates to give you visibility into what's coming in Jira Server and Data Center

Hello, Community! My name is Gosia and I'm a Product Manager on Jira Server and Data Center here at Atlassian. Since 2002 when we launched our public issue tracker, jira.atlass...

637 views 1 15
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