How can I import from CSV with carriage return and line feed in a text field?

Tilmann Brenk July 12, 2011

I need to import data from a CSV file into a project. One import field is the description field which can contain carriage return and line feed, but this will break the import.

I thought of replacing the CR+LF with a some text token like <<CRLF>> and then replacing it after the import using direct SQL on the database.

Is there some better way? Surely this is a common problem?

1 answer

3 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
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 12, 2011

JIRA Command Line Interface supports importing CSV data - see Import JIRA issues. Double quoted fields can contain multiple lines. More generally, it imports CSV conforming with The Comma Separated Value (CSV) File Format .

Tilmann Brenk July 12, 2011

Thanks a lot, now I can import multi-line fields, and add attachments, too.

Susan Price May 5, 2015

Came here to find a solution to the same problem that tilmann.brenk mentions above in OP, but the first link in Bob Swift's answer does not take me to "import jira issues" information. Can anyone provide an update? What is the trick to importing descriptions in a CSV file that have line breaks and would like for them to be imported as line breaks in JIRA description field? Thanks

Bob Swift OSS (Bob Swift Atlassian Apps)
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.
May 5, 2015

I updated the link. Atlassian discontinued plugin studio quite some time ago, so all those links usually have some other location now :(. Let me know if that link doesn't answer your question.

Susan Price May 5, 2015

Thanks Bob. I eventually found my answer here: https://answers.atlassian.com/questions/78189/answers/8629798 Thanks again.

Like # people like this

Suggest an answer

Log in or Sign up to answer