CSV import causes IndexOutOfBoundsException

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

When importing issues from CSV the, operation fails with the exception:

Cause:
java.lang.IndexOutOfBoundsException: Index: 5, Size: 5

Stack Trace: [hide]

java.lang.IndexOutOfBoundsException: Index: 5, Size: 5
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at webwork.util.ValueStack.findValue(ValueStack.java:467)

Cause

The CSV file format is invalid possibly because:

  • The CSV file does not contain a heading row.
  • Each row must contain a column for summary data

Resolution

  1. The CSV importer assumes a Microsoft Excel styled CSV file. Fields are separated by commas, and enclosed in quotes if they contain commas or quotes. Embedded quotes are doubled. Make sure the CSV file is well formed by opening it in Excel, or by confirming the format otherwise.
  2. The CSV file must contain a heading row. The CSV configuration wizard uses the CSV header row extensively. The header values should not have any punctuation (beyond the commas separating records) such as apostrophes or the importer may not work correctly.
  3. As a minimum, the CSV file must contain a column for Summary data.
tip/resting Created with Sketch.

It is possible to have multi-lined CSV. For example, here is a valid file with a single record:

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

Last modified on Mar 21, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.