Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-30746

CSV import fails when file contains hash character and quoted multi-line value

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Low
    • 5.1
    • 5.0.5
    • None

    Description

      JIRA's CSV parser fails given a particular format of valid CSV, with the error:

      Failed to read CSV file, you may decide to ignore the error: java.io.IOException: Malformed CSV stream. Missing ["] near offset 3 after field 0 on line 3

      The CSV in question is:

      Summary,IssueType,CustomField
      Test #1,Bug,"foo
      bar"
      

      What causes this CSV to fail is the hash character, followed by the multi-line quoted string.

      To replicate:

      1. atlas-run-standalone --product jira --version 5.0.5
      2. Log in as admin/admin and create a test project (mine is called TST)
      3. Save the above CSV to a file.
      4. Try to import the CSV into your project. The configuration doesn't matter, but with my TST project I used the config file:
        {
          "date.import.format" : "yyyyMMddHHmmss",
          "project.name" : "Test Project",
          "field.IssueType" : "issuetype",
          "project.lead" : "admin",
          "project.key" : "TST",
          "user.email.suffix" : "@example.com",
          "mapfromcsv" : "false",
          "field.Summary" : "summary"
        }
        
      5. After submitting the "Set up field mappings" form, you will see the error message above:

      Attachments

        Activity

          People

            Unassigned Unassigned
            97bf41494e76 Jeff Turner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: