Creating issues using the CSV importer

If you have the Create Issue project permission and the Bulk Change global permission for the relevant projects, you can create issues in bulk using a comma-separated value (CSV) file. CSV files are text files that represent tabulated data, and are supported by most systems that handle tabulated data such as spreadsheets (MS Excel, Numbers) and databases.

The CSV importer allows you to import data from external systems that can export their data in a tabulated format. It also allows you to create your own CSV file to perform bulk issue creation and updates. 

Your administrator has access to more import options designed specifically for other systems such as Github, Fogbugz and Bugzilla. If you are planning on importing from an external system a large amount of issues, administrators have access to advanced import functionalities by following: Migrating from Other Issue Trackers including Importing Data from CSV

There are two steps to using the CSV importer, and an optional third step:

  1. Preparing your CSV file,
  2. Running the CSV import wizard, and
  3. Saving your configuration for future use.

Preparing your CSV file

The JIRA Importers plugin assumes that your CSV file is based off a default Microsoft Excel-styled CSV file. Fields are separated by commas and any content that must be treated literally, such as commas and new lines/'carriage returns' themselves are enclosed in quotes.

(info) For Microsoft Excel and OpenOffice, it is not necessary to quote values in cells as these applications handle this automatically.

CSV file requirements

In addition to being 'well-formed', CSV files have the following requirements.

Each CSV file must possess a heading row with a Summary column

The CSV file import wizard uses a CSV file's header row to determine how to map data from the CSV file's 2nd row and beyond to fields in JIRA.

The header row should avoid containing any punctuation (apart from the commas separating each column) or the importer may not work correctly.

The header row must contain a column for 'Summary' data.

Commas (as column/field separators) cannot be omitted

For example, this is valid:

Summary, Assignee, Reporter, Issue Type, Description, Priority
"Test issue", admin, admin, 1, ,

... but this is not valid:

Summary, Assignee, Reporter, Issue Type, Description, Priority
"Test issue", admin, admin, 1

Encapsulating JIRA data structure in your CSV file

Capturing data that spans multiple lines

Use double-quote marks (") in your CSV file to capture data that spans multiple lines. For example, upon import, JIRA will treat the following as a valid CSV file with a single record:

Summary, Description, Status
"Login fails", "This is on
a new line", Open

Treating special characters literally

Use double-quote marks (") around a section of text to treat any special characters in that section literally. Once this data is imported into JIRA, these special characters will be stored as part of JIRA's field data. Examples of special characters include carriage returns/enter characters (as shown in the example above), commas, etc.

To treat a double quote mark literally, you can 'escape' them with another double quote mark character. Hence, the CSV value:

  • "Clicking the ""Add"" button results in a page not found error"
    once imported, will be stored in JIRA as:
  • Clicking the "Add" button results in a page not found error

Aggregating multiple values into single JIRA fields

You can import multiple values into a JIRA field that accepts multiple values (e.g. Fix (for) VersionAffects VersionComponentLabels). To do this, your CSV file must specify the same column name for each value you wish to aggregate into the mapped JIRA field. The number of column names specified must match the maximum number of values to be aggregated into the mapped field. For example:

IssueType, Summary, FixVersion, FixVersion, FixVersion, Component, Component
bug, "First issue", v1, , , Component1,
bug, "Second issue", v2, , , Component1, Component2
bug, "Third issue", v1, v2, v3, Component1,

In the above example, the Component field of the second issue and the Fix Version field of the third issue will generate multiple values in appropriate JIRA fields upon import.

(warning) Be aware that only a limited number of JIRA fields support multiple values. The CSV importer will not allow you to import aggregated data into JIRA fields which only support a single value.

Importing attachments

You can attach files to issues created from your CSV file. To do this, specify the URL of your attachment in an 'Attachments' column within your CSV file.

Assignee, Summary, Description, Attachment, Comment
Admin, "Issue demonstrating the CSV attachment import", "Please check the attached image below.", "https://jira-server:8080/secure/attachment/image-name.png", "01/01/2012 10:10;Admin; This comment works"
Admin, "CSV attachment import with timestamp,author and filename", "Please check the attached image below.", "01/01/2012 13:10;Admin;image.png;file://image-name.png", "01/01/2012 10:10;Admin; This comment works"

(info) URLs for attachments support the HTTP and HTTPS protocols and can be any location that your JIRA server must be able to access. You can also use the FILE protocol to access files in the import/attachments subdirectory of your JIRA Home Directory.

Importing issues into multiple JIRA projects

You can import issues from your CSV file into different JIRA projects through a CSV file import. To do this:

  • Your CSV file requires two additional columns whose headings should be named similarly to Project Name and Project Key.
  • Ensure that every issue represented in your CSV file contains the appropriate name and key in these columns for the JIRA projects to which they will be imported.
    (info) The project name and key data is the minimum JIRA project data required for importing issues from a CSV file into specific JIRA projects.
IssueType, Summary, Project Name, Project Key
bug, "First issue", Sample, SAMP
bug, "Second issue", Sample, SAMP
task, "Third issue", Example, EXAM

In the example above, the first and second issues will be imported into the 'Sample' project (with project key 'SAMP') and the third issue will be imported into the 'Example' project (with project key 'EXAM') , assuming you match the 'Project Name' and 'Project Key' fields in your CSV file to the Project name and Project key JIRA fields, respectively during the CSV file import wizard.

Importing worklog entries

Your CSV file can contain worklog entries. For example:

Summary,Worklog
Only time spent (one hour),3600
With a date and an author,2012-02-10 12:30:10;wseliga;120
With an additional comment,Testing took me 3 days;2012-02-10 12:30:10;wseliga;259200

To track time spent, you need to use seconds.

Importing to multi select custom fields

Your CSV file can contain multiple entries for the one Multi Select Custom Field. For example:

Summary,Multi Select,Multi Select,Multi Select
Sample issue,Value 1,Value 2,Value 3

This will populate the Multi Select Custom Field with multiple values.

Importing cascading choice custom fields

You can import values to a cascading choice custom field using the following syntax:

Summary, My Cascading Custom Field
Example Summary, Parent Value -> Child Value

The '->' separator allows you to import the hierarchy.

NOTE: Currently JIRA does not support importing multi-level cascading select fields via CSV ( JRA-34202 - Allow CSV import to support Multi-Level Cascading Select plugin fields Open ).

Running the CSV file import wizard

Before you begin: If your JIRA installation has existing data — Back up your existing JIRA data.

  1. Select Issues > Import Issues from CSV to open the Bulk Create Setup page. (If you do not have the option Import issues from CSV, your JIRA Admin must update the JIRA Importers plugin to version 6.2.3 or above.)
  2. On the Setup page, select your CSV Source File.
    Leave the Use an existing configuration file check box cleared if you do not have a configuration file or if you want to create a new configuration file. Configuration files specify a mapping between column names in your CSV file's header row and fields in your JIRA installation.
    • If you select this option, you will be asked to specify an Existing Configuration File.
    • If you do not select this option, then at the end of the CSV file import wizard, JIRA will ask you if you want create a configuration file which you can use for subsequent CSV imports.
  3. Click the Next button to proceed to the Settings step of the CSV file import wizard. Complete the required fields.
    • If your CSV file uses a different separator character other than a comma, specify that character in the CSV Delimiter field. If the separator is a 'Tab', this can be entered using the format '/t'.
  4. Click the Next button to proceed to the Map fields step of the CSV file import wizard. Here, you can map the column headers of your CSV file to the fields in your selected JIRA project. If you want to select specific JIRA field values to map specific CSV values to, tick the check-box for Map field value.
    (info)Note: You must map a CSV field to the JIRA summary field. This ensures the issues created have a summary.

  5. Click the Next button to proceed to the Map values step of the CSV file import wizard. On this step of the import wizard you can select which specific CSV field values you want to map to which specific JIRA field value. For example, your issue types you may have a CSV field value of "Feature Request", which you may want to map to the JIRA issue type field value "New Feature".
    (info)Please Note:

    • Any fields whose Map field value check boxes were selected in the previous step of the CSV file import wizard will be presented on this page.
    • Leave a field cleared or clear any content within it if you wish to import the value 'as is'.

    • If you are importing a username-based CSV field (e.g. Reporter or Assignee) and you do not select the Map field value check box for this field in the previous step of the CSV file import wizard, then the importer will automatically map imported usernames from the CSV file to (lowercase) JIRA usernames.
      (info) Regardless of whether or not you select the Map field value check box, JIRA will automatically create usernames based on the data in your CSV file if they have not already been defined in JIRA. 

  6. Click the Begin Import button when you are ready to begin importing your CSV data into JIRA. The importer will display updates as the import progresses, then a success message when the import is complete.
  7. If you're confident your import is correctly setup, click the Begin Import button. Your import will begin and once complete you will be informed of any errors. If you'd like to check your import first, click the Validate button and JIRA will validate your import and inform you of any expected errors or warnings. You can then go back and correct these before running your full import.

(info)Note:

    • If you experience problems with the import (or you are curious), click the download a detailed log link to reveal detailed information about the CSV file import process.
    • If you need to import another CSV file with the same (or similar) settings to what you used through this procedure, click the save the configuration link to download a CSV configuration file, which you can use at the first step of the CSV file import wizard.

Congratulations, you have successfully imported your CSV data into JIRA! If you have any questions or encounter any problems, please contact Atlassian support.

Tips for importing CSV data into JIRA fields

Below are some helpful tips when importing data from your CSV file into specific JIRA fields:

JIRA Field

Import Notes

Project

CSV data is imported on a per-project basis. You can either specify an existing JIRA project(s) as the target, or the importer will automatically create a new project(s) for you at time of import.

Summary

This is the only required field.

Component(s)

You can import issues with multiple components by entering each component in a separate column.

Affects Version(s)

You can import issues with multiple 'Affects Versions' by entering each version in a separate column.

Fix Version(s)

You can import issues with multiple 'Fix Versions' by entering each version in a separate column.

Comment Body

You can import issues with multiple comments by entering each comment in a separate column.

Due Date

Please use the date format specified on the second step of the CSV import wizard.

Issue Type

If not specified in your CSV file, imported issues will be given the default (i.e. first) Issue Type as specified in your JIRA system  Defining 'Issue Type' Field Values. You can also create new JIRA values on-the-fly during the import process.

Labels

You can import issues with multiple labels by entering each label in a separate column.

Priority

If not specified in your CSV file, imported issues will be given the default (i.e. first) Priority as specified in your JIRA system  Defining 'Priority' Field Values. You can also create new JIRA values on-the-fly during the import process.

Original Estimate

The value of this field needs to be specified as number of seconds.

Remaining Estimate

The value of this field needs to be specified as number of seconds.

Time Spent

The value of this field needs to be specified as number of seconds.

Users

You can choose to have the importer automatically create JIRA users for any values of the Assignee or Reporter field.

  • Users will be created as active accounts in JIRA. Users will need to get their passwords emailed to them the first time they log into JIRA.
  • Users with no real name will get the portion of their email address (login name) before the "@" character as their Full Name in JIRA.
  • If you are using External User Management, the import process will not be able to create JIRA users; instead, the importer will give you a list of any new users that need to be created. You will need to create the users in your external user repository before commencing the import.
  • If you have a user-limited license (e.g. personal license), and the number of required users is larger than the limit, then the import will be stopped. A page will be displayed showing a list of users that can't be created.
  • If Assignee and Reporter are not mapped, then no usernames are created

Other fields

If you wish to import any other fields, you can choose to map them to specific JIRA custom field(s). If your custom fields don't yet exist in JIRA, the importer can automatically create them for you. If your custom field is a date field, please use the date format specified on the second step of the CSV import wizard.

Was this helpful?

Thanks for your feedback!

Why was this unhelpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport