NOTE: This bug report is for JIRA Server. Using JIRA Cloud? See the corresponding bug report.

      Summary

      The documentation for New line in CSV external import in JIRA doesn't work

      Steps to Reproduce

      1. Create and save a CSV file as per the documentation Importing Data From CSV
        Summary, Description, Status
        "Login fails", "This is on
        a new line", Open
        
      1. Do a CSV import in JIRA using the External Import in JIRA

      Expected Results

      Issue created to have multiple line in it's Description field.

      Actual Results

      Imported issue is in one line rather than multiple lines.

      "Login fails", "This is ona new line", Open
      

      Workaround #1

      On the Map fields screen, map your incoming field to the appropriate Jira field, but do not tick the Map field value checkbox. Ticking this box takes you to a screen where your browser will strip out your extra formatting.

      Depending on the formatting of your data and the field it's importing into, you may also want to wrap your incoming comment in {noformat} tags.

      Workaround #2

      It is possible to create newlines by using:

      \\ 

      at the beginning of each line as per the example below:

      Summary,Type,Description,Status
      "next csv new line test","Bug","Atlassian
      \\ Testing Issue
      \\ Acceptance Criteria
      \\ - Line 1
      \\ - Line 2
      \\ - Line 3
      \\ - Line 4",To Do
      

      However, this workaround creates another issue with the exported field as mentioned in this bug ticket: JRA-46364

        1. Problem1.png
          Problem1.png
          254 kB
        2. Workaround1.png
          Workaround1.png
          78 kB

            [JRASERVER-46365] New line in CSV external import in JIRA doesn't work

            I'll just add, that if, like us, you needed to restore some issue data from a dev instance/backup, to fix some production instance values for the description field.

            You can avoid the need to external system import, by making a relatively simple automation for Jira rule

            Scheduled trigger

            JQL condition

            Send webhook:

            https://base_url/rest/api/2/issue/{{issue.id}}

            Action - Edit Issue

            {{webhookResponse.body.fields.description}} 

            I have tested this on individual tickets and batches of 50 and 150+ tickets. This weekend I will also be running this on close 1000 tickets that were recently affected by a bad bulk move to another project.

            Steve Letch added a comment - I'll just add, that if, like us, you needed to restore some issue data from a dev instance/backup, to fix some production instance values for the description field. You can avoid the need to external system import, by making a relatively simple automation for Jira rule Scheduled trigger JQL condition Send webhook: https: //base_url/ rest /api/2/issue/{{issue.id}} Action - Edit Issue {{webhookResponse.body.fields.description}} I have tested this on individual tickets and batches of 50 and 150+ tickets. This weekend I will also be running this on close 1000 tickets that were recently affected by a bad bulk move to another project.

            XU QIANG HUANG added a comment - - edited

            Hi, 

            I also meet the issue, I would like to add a table in "Description" field, which is expected to be 

            Description: abc

            Item Description Counter
            abc xxxxxx 4

             

            However, after upload, the format can't switch to table, it is still a text:

            Description: abc
            \\||Item||Description||Counter||
            |abc|xxxxxx|4|

            I tried the workaround #1 & #2, but the issue still persists, please suggest how to do.

            XU QIANG HUANG added a comment - - edited Hi,  I also meet the issue, I would like to add a table in "Description" field, which is expected to be  Description: abc Item Description Counter abc xxxxxx 4   However, after upload, the format can't switch to table, it is still a text: Description: abc \\||Item||Description||Counter|| |abc|xxxxxx|4| I tried the workaround #1 & #2, but the issue still persists, please suggest how to do.

            Workaround #1 is working fine. With that method, my new line issue got resolved. Thanks!

            Harish Kumar added a comment - Workaround #1 is working fine. With that method, my new line issue got resolved. Thanks!

            Issa added a comment -

            Problem still there in v 9.4.1

            Issa added a comment - Problem still there in v 9.4.1

            The "don't tick the Map field value" box thing didn't work for me. However, adding two backslash characters (
            ) where I wanted the line break did work. Note: do not add a space after the
            as this will add a space before your new line. This is super annoying issue; hopefully this will be fixed soon.

            Fontane, Matt added a comment - The "don't tick the Map field value" box thing didn't work for me. However, adding two backslash characters ( ) where I wanted the line break did work. Note: do not add a space after the as this will add a space before your new line. This is super annoying issue; hopefully this will be fixed soon.

            I have tried the 1st work around it worked as expected.

            Alfaz Mohd added a comment - I have tried the 1st work around it worked as expected.

            Nirmani Kalakheti added a comment - - edited

            We use Jira 8.5.x version and had same issues for the description field. But I was able to resolve by following the frist  workaround, "On the Map fields screen, map your incoming field to the appropriate Jira field, but do not tick the Map field value checkbox. Ticking this box takes you to a screen where your browser will strip out your extra formatting".

            Thanks for your help @Isabel Murakami

            Nirmani Kalakheti added a comment - - edited We use Jira 8.5.x version and had same issues for the description field. But I was able to resolve by following the frist  workaround, "On the  Map fields  screen, map your incoming field to the appropriate Jira field, but  do not  tick the  Map field value checkbox. Ticking this box takes you to a screen where your browser will strip out your extra formatting". Thanks for your help @Isabel Murakami

            I am getting same error on Jira Data Center on Windows server

            Carla Ann K. Rowland added a comment - I am getting same error on Jira Data Center on Windows server

            We use Jira Version 8.9.0 and got the Problem that the format of e.g. the description is broken after csv import.

            Barbara Hofreuter added a comment - We use Jira Version 8.9.0 and got the Problem that the format of e.g. the description is broken after csv import.

            Michael, the Fix Version field is a string field, not long text, so why do you try to put an LF there? It seems that your CSV has bad data that should be cleansed (like you did).

            What you encountered looks like a Jira bug, but IMO, it's an edge case.

            Amir Katz (Outseer) added a comment - Michael, the Fix Version field is a string field, not long text, so why do you try to put an LF there? It seems that your CSV has bad data that should be cleansed (like you did). What you encountered looks like a Jira bug, but IMO, it's an edge case.

              Unassigned Unassigned
              nghanis Nithiyaa Ghanis (Inactive)
              Affected customers:
              88 This affects my team
              Watchers:
              78 Start watching this issue

                Created:
                Updated: