Convert Line Break Character to Line Break in Description

Adam MacDonald May 30, 2019

I import many user stories en masse via a CSV.  I format line breaks in the Description field using the line break character `\\ `.  When I view the created story in Jira and click to edit the Description I see the line break characters still in the text.  

 

Is there a way to automatically convert the line break characters to actual line breaks when editing the Description field?  At a previous employer their instance of Jira had been setup to do that, but I don't know what they setup or if it was part of their plan.

2 answers

1 accepted

0 votes
Answer accepted
Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 31, 2019

Hi Adam,

It looks like you are Running the CSV import workaround described in this BUG report:

As covered in the BUG report the Workaround causes the behavior you are seeing while editing the issues description and will point you to the following BUG report where this is particular formatting error is being tracked:

For the issues that are already in this state I would recommend modifying the data manually as it is found and causing an issue as the alternatives approach will more than likely cause more issues than it fixes. 

To do a search and replace of specific characters in a text field I am not aware of any method to achieve this other than a direct database edit which cannot be done on the cloud platform directly, so the only things I could think of as possibilities would be to migrate the data to a temporary Jira Server instance, and perform a database edit as described in the following post and then re-import the data back to the cloud site, however this has a lot of potential for feature loss along with possible data truncation and loss depending on what feature sets and add-ons are being used on the cloud instance as well as having a lot of overhead and downtime to complete this type of migrate and modify process:

But moving forward with CSV imports, It looks like there have been some changes to Jira Cloud that have been put in place recently and the Import portion of the BUG that requires the workaround appears to be fixed but not marked as fixed on the bug report (Note, I have reached out to our Product team to review the initial Bug for the import issue to verify why this one is still showing as open) as testing this out I have no need to use the escape characters in the CSV import, and you should be able to use multiple line values in a CSV import without issue, EXE:

A CSV file formatted like the following is working in my tests and maintain the line breaks with no issue:

Summary,Description
"EXE summary","Testing Issue
- Line 1
- Line 2
- Line 3
- Line 4"

Let me know if you have any additional questions and we will get the BUG JRACLOUD-46365 updated shortly.

Regards,
Earl

Adam MacDonald June 3, 2019

I imported the CSV in the format you described with the line breaks within the CSV but when it imports it imports the description as a single line.  The double space at the end of each line is there, but it concatenated each line broken line into one line.

Adam MacDonald June 10, 2019

@Earl McCutcheon  Were there any additional tricks to try?  The steps above didn't appear to work.  Could this also be dependent upon the versions of Jira which are used?  

Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 17, 2019

Hi Adam,

I was playing around with this a bit and found the disconnect. 

When mapping the fields, make sure to leave the checkbox option for "Map field value" unchecked as the workaround but set the field name in the "JIRA field" drop down like this:

Screen Shot 2019-06-17 at 8.36.40 AM.png

Regards,
Earl

Like # people like this
1 vote
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 31, 2019

Hello Adam,

Welcome to Atlassian community.

The "\\" character is used on Wiki markup renderer to properly add line breaks in texts, however, the new issue view of JIRA uses wiki markdown renderer, which does not render the character.

We have created a feature request about this behavior here:

The history in the new issue view does not display break lines

That been said, you can try two options that may workaround this problem:

1 - Navigate to your profile > Personal settings > disable the new issue view > Try to import the CSV.

P.S: If you are using next-gen, only the new issue view is available, so this option will definitely not work.

2 - Try to follow the markup syntax the line breakers, by adding the text in the CSV file and adding two spaces and shift-return (enter) in the cell of the field.

Let me know if one of the options above worked for you.

Adam MacDonald June 3, 2019

I tried the second option but it didn't work.  It appears I also followed the instructions from that document.  

Suggest an answer

Log in or Sign up to answer