Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to migrate issue attachments into JIRA?

Kyle
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.
April 1, 2012

Hi guys,

I am planning to migrate all changes from an existing system to our JIRA instance. As far as I am concerned and tried, I can only migrate issue information, but not the attachments.

I have about 30,000 issues in my old change system and manual work is just impossible. How do i do that?

Thanks,
Lee

3 answers

1 accepted

0 votes
Answer accepted
Bob Swift
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.
April 1, 2012

JCLI addAttachment combined with runFromSql with a query on your old system database. You will need a mapping table between between old issue number and new JIRA key to get the association of the attachment to the issue.

Kyle
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.
July 5, 2012

Hi Bob,

Thank you so much for the awesome tool, JCLI. I managed to import most attachments to JIRA. However i have some out of memory crashes when importing files > 40MB.

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
	at org.swift.common.cli.CliClient.getFileAsBytes(CliClient.java:1492)
	at org.swift.common.cli.CliClient.getFileAsBytes(CliClient.java:1517)
	at org.swift.jira.cli.JiraClient.addAttachment(JiraClient.java:2211)
	at org.swift.jira.cli.JiraClient.handleRequest(JiraClient.java:523)
	at org.swift.common.cli.AbstractRemoteClient.process(AbstractRemoteClient.java:119)
	at org.swift.common.cli.CliClient.doWork(CliClient.java:299)
	at org.swift.jira.cli.JiraClient.main(JiraClient.java:146)

So i edited jira.bat and added -Xmx256m or more to:

java -Xmx256m -jar "%dirPath%"/lib/jira-cli-2.5.0.jar %*

Still it fails like this. Any idea? Returned error code was 1. Thank you.

Regards,

Lee

Bob Swift
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.
July 6, 2012

Good idea, but go as large as you can - 1G or more. Others (https://jira.atlassian.com/browse/JRA-11693?focusedCommentId=224647&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-224647) have reported 50MB work - I test using 3MB high.

0 votes
Nic Brough -Adaptavist-
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.
April 1, 2012

What do you mean by "migrate", what is the source system, and which version of Jira is it? There's a few options for doing this, but which one you choose depends on what shape your data is in and how you're importing.

For example, there's an importer plugin which can talk to some other tracking systems, or import CSV. You might want to use Jelly. It might be worth knocking up a bit of external code to poke stuff in with SOAP, or as a last resort, SQL. Or even mix and match methods. But we can't really advise unless we know what the shape of the source data is

Kyle
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.
April 1, 2012

Hi Nic,

The source system is HighStage, http://www.highstage.net/, a Danish product.
To JIRA version 5+, I have v5.0 and v5.0.1.

I want to import not only information from CSV files. This is what i meant by issue information in my question. What i am interested in includes the attachments of issues from my source system.

I can import just from CSV files but that will only give me issues without attachments in JIRA. I also want to know how to import attachments from my source system into JIRA so the issues imported will also have its attachments.

Thanks,
Lee

Nic Brough -Adaptavist-
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.
April 1, 2012

Sounds like a job for the command line plugin - it's sufficiently complex that I can't really point at any of the built-in stuff and would recommend the "write some external scripts to do it" approach. That always leads to me saying "use the command line plugin because it'll make your scripting a lot more easy"...

https://studio.plugins.atlassian.com/wiki/display/JCLI/Documentation

Dieter
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.
July 6, 2012
It's possible to let the standard CSV importer also add attachments to the imported issue. Just have a look at at https://confluence.atlassian.com/display/JIRA044/Importing+Data+From+CSV Only attachmemts reachable via https and http URLs are supported. These URLs must be reachable from the JIRA server.

Adding attachmemts is also possible from Jelly scripts., This is what i also have done successfully in the past. Adding attachments using the CSV importer is something i haven't verified yet

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events