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

Rahul K June 11, 2015

Hello,

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.

-Rahul

5 answers

1 accepted

1 vote
Answer accepted
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 13, 2015

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.

 

Rahul K June 14, 2015

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?

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 14, 2015

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.

Rahul K June 14, 2015

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
GabrielleJ
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 11, 2015

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.

1 vote
Pedro Cora
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 11, 2015

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

wink

-- Pedro

0 votes
Rahul K June 11, 2015

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

0 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 11, 2015

JIRA Command Line Interface (CLI) using the addAttachment and addComment actions. runFromCsv may also be of use.

Suggest an answer

Log in or Sign up to answer