Import attachments, after project import

Tony Stevenson January 27, 2013

Folks,

Some time ago we completed a project import on a now older version JIRA (was 5.0.4, now 5.2.1). The import went well, except that we did not include attachments at the time as the ZIP file they were in was not unpacking, so we thought we could do this later.

Needless to say we cannot eaily do this. What I am looking for is a way to retrospectively add/import attachments for a single project any months after the initial import. I dont really want to have to go through the sandbox(5.0.4), import, upgrade (5.2.1), export, import into live route if I can avoid it. Not only is the project huge, but it also has many thousands of issues and I suspect this would be easily a 1 full week roujnd trip.

Is there a way to do this directly with a SQL query, as I see it all the attachments are refs in SQL anyway.

3 answers

3 votes
Pawel Niewiadomski
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.
January 28, 2013

You can also try using JIRA Importers Plugin for that, it will allow you to add attachments to issues that already exist.

Tony Stevenson February 3, 2013

Pawel,

How exactly? I dont see an obvious option to add attachments.

Pawel Niewiadomski
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.
February 3, 2013
Like Domm Dommes likes this
Lukas Maruniak August 7, 2014

Well, I think this is only possible, when you want to import attachments together with new issues. If you already have issues present in your project and want to import attachments to them, there's no option for doing so. Please, correct me, if I'm wrong.

Like John Persson likes this
Wojciech Seliga
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.
August 10, 2014

@Lukas, IIRC adding attachments to already existing issues in CSV import should work too. You need to include in each row in CSV file an issue key of already existing issue and map it correctly (Issue Key) in the configuration wizard.

0 votes
Renjith Pillai
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.
February 3, 2013

Tony, as I said below your issues will be already having atachment data. The files alone will be missing, you just need to copy that. Can you check one of the issues?

0 votes
Renjith Pillai
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.
January 28, 2013

The attachment data should have come already in database. Do a query on fileattachment table and check whether it is existing. You need to just copy the project directory from old jira home/attachments to the new location. It should work.

Tony Stevenson February 3, 2013

Hi,

I have looked and there is no attachment data for any of the >60k items. I have tried that already. But thanks.

Suggest an answer

Log in or Sign up to answer