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

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

This widget could not be displayed.

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.

This widget could not be displayed.
Pedro Cora Atlassian Team Jun 11, 2015

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

wink

-- Pedro

This widget could not be displayed.

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.

This widget could not be displayed.

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

This widget could not be displayed.

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

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted yesterday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

77 views 1 0
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