import attachment via CSV import utility...

satyakam panigrahi October 8, 2013

We know we can import attachment via CSV file using HTTP protocol(ex. http://xxx-server:8080/attach/fie.png),

but for this is it mandaory that file must be present under <JIRA_installation>/atlassian-jira/folder/ ?

1 answer

1 vote
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.
October 8, 2013

No. We don't expect anyone to put flies into JIRA installation directory.

You need to put files somewhere (e.g. your hard drive, Dropbox, Microsoft shared drive, you name it) and expose them via HTTP.

Allowing reading any arbitrary files from JIRA installation directory would create a security vulnerability.

satyakam panigrahi October 10, 2013

Hi Seliga,

Here my requirement is importing attachment from other tool like DDTS to JIRA as a part of data import ...

Can you please tell us what you mean by "Expose them via HTTP" ?

Are you saying URL in csv may not be necessarily in the format like http://jira-server:8080/attach/file instead it can import file from any HTTP location which is reachable ?

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.
October 10, 2013

Hey,

Yes. URL should normally not point to your JIRA instance. It should point to the place (in your local network or in the internet) where your files are available via HTTP. You can easily expose all files from given directory directory via: Dropbox, IIS, shared folders in Windows, Apache, etc.

While importing attachments JIRA will try connect to these URLs using anonymous access and will fetch the file content and store it as tha attachment for given issue.

Cheers,

Wojtek

Sean Johnson October 29, 2013

Hi Wojtek,

Should it matter if I have subdirectories in the http path?

For example, I have several thousand attachments to import that can be reached via http://<internal IP address>/SDE and beneath SDE have have several thousand folders with numbers. Those folders contain my attachments.

example directories:

/SDE/1234/word.doc

/SDE/4567/excelsheet.xlsx, etc.

If I use a csv string like :

'key-1, summary, http:// <internal IP address>/SDE/1234/word.doc'

'key-2, summary, http:// <internal IP address>/SDE/4567/excelsheet.xlsx'

Should this work? I am getting attachment errors when I try. I've had success with the File protocol on 5.1, but this system is 5.0 so I believe I need to use this HTTP protocol, correct?

Shinjani Gaur January 20, 2014

I too am looking for a solution to this problem. I am using CSV import to import data into Jira and have several thousand attachments that need to be migrated. Do I need to specify the location of each and every attachment in the csv file?

Suggest an answer

Log in or Sign up to answer