Illegal Date Format in CSV File Breaks Project Import
Symptoms
The following error is thrown, while importing issues via CSV;
java.lang.IllegalArgumentException: Illegal pattern character 'Y'
at java.text.SimpleDateFormat.compile(SimpleDateFormat.java:675)
at java.text.SimpleDateFormat.initialize(SimpleDateFormat.java:494)
at java.text.SimpleDateFormat.(SimpleDateFormat.java:443)
at java.text.SimpleDateFormat.(SimpleDateFormat.java:424)
at com.atlassian.jira.imports.csv.PropertiesCsvMapper.init(PropertiesCsvMapper.java:50)
at com.atlassian.jira.imports.csv.MindProdCsvProvider.startSession(MindProdCsvProvider.java:48)
at com.atlassian.jira.imports.csv.CsvDataBean.populateCache(CsvDataBean.java:122)
Cause
An invalid date format (like MM/dd/YYYY) is in use. The capital Y is not recognize by the SimpleDateFormat class
Resolution
Change the date format and retry the CSV import:
These time and date formats are used throughout JIRA. To specify them, use the format described at http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html.
When you are not in edit mode, the examples in the rightmost column show you how the various formats will appear.
To set the date picker format, see:
- 'Advanced JIRA configuration' (for JIRA 4.4.x and later), or
- 'Advanced JIRA configuration with jira-application.properties' (for JIRA 4.3.x and earlier).
Here are some example configurations for U.S time:
Preferred Date |
Configuration in jira-application.properties |
---|---|
Oct/1/10 |
jira.date.picker.java.format = MMM/d/yy |
10/05/10 |
jira.date.picker.java.format = MM/dd/yy |
Jan 5, 2010 |
jira.date.picker.java.format = MMM dd, yyyy |
10/05/2010 |
jira.date.picker.java.format = MM/dd/yyyy |