import CSV data as Jira issues

Nathanael de wet August 15, 2012

Hi,

I've searched high and low but alas, no avail. When importing (e.g. comments field) from CSV into Jira issue comments line breaks seem to be ignored. I've tried \r\n \n \\, yet none of these seem to work. the Jira CSV imported seems to absorb them but not process them. am I missing something? However, when I copy and paste text from the CSV file (e.g. this is a \\newline) into a Jira issue comment, a new line is created as expected. This could possibly be because Jira looks at the CSV data differently on import in that it cannot recognized the way the CSV data had been formatted in the first place... or there could be a potential bug in the import module.

Also, my original problem, just want to know if it's possible to import comments decorated with html tags (exported as CSV from bugnet) into Jira. currently, to my understansing, this is not possible. I will have to re-format the data as plain text with basic line break formatting before importing it into Jira as issues.

perhaps there are converter tools e.t.c that could help me?

any help would be appreciated. thx

8 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

12 votes
Peter Del Sordo November 29, 2018

Our team discovered that unchecking the "Map field value" box during the third step of the external csv import process, will preserve formatting for any text field that contains special formatting or carriage returns (e.g.-Acceptance Criteria, Descriptions, and Comments).  We tested this work-around for numerous import scenarios and it works every time!

Randal December 31, 2018

Champs! Thanks this was the trick that allowed my carriage returns/new lines to appear after importingno check in MAP field value allowed  carriage return.JPG

Like # people like this
7 votes
Guido Montalbetti September 22, 2014

Hi,
I have inserted this in my Description:
bla bla bla \\ blo blo blo
without "\\" or '\\' and saved the CSV File as UTF-8
After import my description in JIRA was
bla bla bla
blo blo blo

Susan Price May 5, 2015

Thank Guido. That helped! I want mention for those who end up here on the same journey and are trying to achieve consecutive new lines in a description that you're trying to import via CSV, be sure to insert a space between the two sets of \\, i.e.: ---- text\\(space)\\(space)more text ---- will display as such in JIRA after import: --- text more text ---

Like # people like this
Chuck Jarrett April 19, 2016

Also please note that the \\ will only be rendered as a line break when the Wiki Style Renderer is applied to the field (as opposed to the Default Text Renderer that is associated by default with custom text fields).  Without the Wiki Style Renderer, you'll just see \\ in your text in JIRA.

Ben Bailey May 18, 2016

Thank you guido! this worked for me.

Deeplaxmi Jedhe July 18, 2019

thnx it solved my problem as well :)

1 vote
Michael Pavey September 23, 2016

Yes — pretty amazing how poorly the JIRA CSV importer handles this. It wouldn't be so bad if it weren't for the fact that a) the only method JIRA offers for migrating a single project from one instance of JIRA Cloud to another one is CSV (or cloning the whole instance, which unsurprisingly is not a solution my agency, with its dozens of other clients, was open to…); and b) the CSV format JIRA itself creates when you export a project doesn't work in the JIRA CSV importer 😂 

Anyway, for anyone in the same situation, I recommend:

  1. Convert the CSV file into tab-separated values. This Python script was an approach that worked well for me.
  2. Replace all line feeds with the \\  character sequence (I included a space as well as the two slashes). 
    For a hosted instance Sven's solution of editing the database would work better I'm sure. But that's not an option with JIRA Cloud, and this approach worked fine for both issue descriptions and comments. (The bits that didn't work were i) if you have a link at the end of a line, JIRA interprets the slashes as part of it; and ii) preformatted text blocks. Also, when you edit a description/comment, you'll see the slashes when you edit it, which is annoying and probably confusing to any users not familiar with this quirk.) 

One other pointer: after these two fixes, the only issues that didn't import were issues where the Status didn't map to one already set up in JIRA. There is an error message, but it's hidden away in the log file.

 

Andrew Uzilov January 24, 2018

As a Jira Cloud user, I concur, and I am surprised that this issue is still alive and well years later:

https://community.atlassian.com/t5/Jira-questions/How-to-specify-NEW-LINE-or-TAB-during-CSV-import/qaq-p/665410

despite being accepted as a bug by Atlassian:

https://jira.atlassian.com/browse/JRACLOUD-46365

I am wondering if I am missing something here!

Michael Pavey January 24, 2018

Ha, I have no insight to provide but figured I'd reply just to show some solidarity…since you're unlikely to get a response from Atlassian! 😡

Of course, I'd love to be proven wrong. Based on my experience across multiple issues though, my sense is that the JIRA issues log is more or less a bottomless pit that receives precious little attention, and that investment in the JIRA product development is some way off where it needs to be. (The recent overhaul of the interface is at least a nice exception to that.)

Alex Alesio August 9, 2018

i can't believe this issue is still

open

( yes, intentional line 

breaks )

1 vote
Kers September 15, 2015

Thank you all for posting this and keeping the thread going - I'm not sure why JIRA makes this so hard to do?  I've used other tools and never had to start plugging in tags, etc. just to make a new line upon import - very odd.

0 votes
Helen Robberts February 5, 2019

All you need to do it untick the 'field mapping' checkbox and the upload will work with line spaces

Brandon Uniewski June 19, 2019

If I do uncheck field mapping, then when i select "Next" it doesnt show my field at all, essentially not mapping it to any value in JIRA.  Unless im just supposed to keep going?

(EDIT) yes it looks like all i need to do is uncheck that box and the next screen wont report it, but it will get mapped on final creation.

Like Peter Del Sordo likes this
0 votes
sven-mvolution April 8, 2016

As of today this issue is still not fixed by Atlassian sad

My solution: Fix the line-breaks directly on the database.

Steps for JIRA v7.1.2 and PostgreSQL:

  • prepare your CSV by replacing every line break by a special unique character sequence, e.g. <LINEBREAK>
  • import the CSV into JIRA
  • replace every occurance of that string in the database (table "jiraissues") - in psql this can be done with (note the line break in the statement below):

    update jiraissue set description=replace(description, '<LINEBREAK>', '
    ');

     

  • finally rebuild JIRA index (Administration|System|Indexing|Re-Index)

0 votes
philas January 14, 2015

Hi Oliver,

 

are there any converter tools? have you found anything? i want to transfer bugnet to jira but dont find any information. raw csv export isn't enough... :(

VG

0 votes
Oliver Wahler August 15, 2012

Did enclose the contents in double quotes as described here?https://confluence.atlassian.com/display/JIRA/Importing+Data+from+CSV#ImportingDatafromCSV-Capturingdatathatspansmultiplelines

At least it worked on my end lately.

Nathanael de wet August 15, 2012

Hi Oli,

Thanks for the reply.

I've tried the above mentioned too. still no luck. the text "\\" ends up as "\" without any new line breaks.... I've also tried "\" but all i get is "". I've tried it as '\\' but get '' . What I do is copy paste the data directly over from SQL table (in SQL management Studio) over to excel. From excel I save as csv. how did you generate your csv? we currently running Jira 4.4.1

Regards

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events