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

The "Invalid project key" error shown during CSV import is misleading

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 7.3.2
    • Jira Importers Plugin

    Description

      Problem definition

      While importing a CSV file into existing project (defined in CSV), an error message about invalid project key appears after mapping the value. However, the project key is correctly defined in the CSV file and correctly mapped. The actual problem is with the project name but the error message could mislead the admins.

      Steps to reproduce the issue

      Scenario 1: There is a leading or trailing space in the project name

      1. Create a project named DESK * (with a trailing space) and project key as *DESK.
      2. Create CSV file below.
        Project Name,Project Key,Summary
        DESK,DESK,CSV bug
        
      3. Go to Administration > System > External System Import > CSV and import the CSV file.
      4. Map the fields accordingly to import the issue.

      Scenario 2: Case sensitive

      1. Create CSV file below.
        Project Name,Project Key,Summary
        Desk,DESK,CSV bug
        
      2. Go to Administration > System > External System Import > CSV and import the CSV file.
      3. Map the fields accordingly to import the issue.

      Expected result

      The CSV file is imported successfully.

      Actual result

      It's not possible to proceed after mapping the fields as the error below occurs on the screen.
      Invalid project key DESK: Project key or name is already used. If you want to import to an existing project the name and the key must match it exactly.

      Workaround

      • To identify if there's any leading or trailing space in the project name, use the SQL query below. The name can then be changed via the UI to eliminate the space.
        select * from project where pname like ' %' or pname like '% ';
        
      • Make sure the project name value in the CSV file is exactly the same as per the project name.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              michin Michelle Chin
              Votes:
              12 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated: