Importing attachments from CSV

I am trying to import attachements from a csv file exported from Redmine. I used concat in my sql query to insert the correct url of the attachments. When I use the CSV importer it gives me a 404 error saying it cannot download the attachments.

#CONCAT('http://redmine.localdomain/', attachment_files.disk_filename)  AS attachments,

I am also trying to import all documents from Redmine into Jira. Can someone provide some insight into that process as well? Thanks.

1 answer

1 accepted

This widget could not be displayed.

Well, if you get HTTP/404 during import I guess the URL-s you produced are wrong.

Looking at the concat you used I guess attachment_files.disk_filename is relative to the installation directory of Redmine which may be totally different than the URL Redmine is available at.

What you need to produce is a correct URL that you can use in your browser to reach the file.

Ok. I have over 1800 attachments and they have subfolders as well. For example redmine.localdomain/200, redmine.localdomain/50, redmine.localdomain/700 etc. Would it be more efficient to just create a SQL script which imports all required fields into the fileattachment table in the Jira database? I can then set the file location and move the attachments over. Thanks.

Don't do it with SQL, there's all sorts of hassle and risks around doing it that way. I'd highly recommend either correcting your paths as Pawel suggests, or using the CLI as Bob said.

Thanks guys. I appreciate the quick responses.

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 Wednesday 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...

182 views 2 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