com.atlassian.jira.issue.customfields.impl.FieldValidationException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • On a JIRA where the "Date/Time Formats" are customised, a csv import with DateTime fields with a format different from the default "dd/MMM/yy h:mm a" fail to import fields with a message: {quote} (!) Cannot add value [ 11/03/15 10:27 ] to CustomField Test Date in Issue with summary 'Test Issue for DateTime CSV import'. Exception Message: Invalid date format. Please enter the date in the format "dd/MMM/yy h:mm a". {quote} h4. Steps to reproduce: # Go to the "Look and Feel" section and set "Complete Date/Time Format" to: *dd/MM/yy HH:mm* # Create a Custom Field called "Test Date" and type "Date Time Picker" (no need to link it to a screen) # Go to "External System Import" -> "Import from Comma-separated values (CSV)" # Select the CSV file attached to this issue [^DateTimeTest.csv] and click Next # Select a Project and verify the "Date format" is set to *dd/MM/yy HH:mm* # Map to corresponding fields # Click Next and Begin Import *Expected Result:* Issue with DateTime field imports correctly *Actual Result:* the issue is imported successfully but the "Date Time" fields is not and the error is displayed. JIRA logs the following error: {noformat} 2015-05-21 16:10:38,088 JiraTaskExectionThread-7 WARN mbadii 970x2777x1 503sx 59.167.133.1,59.167.29.201 /secure/admin/ImporterLogsPage!import.jspa [imports.importer.impl.AbstractDataImporter$1Thread[TP-Processor68,5,main]] Cannot add value [ 11/03/15 10:27 ] to CustomField Test Date in Issue with summary 'Test Issue for DateTime CSV import'. Exception Message: Invalid date format. Please enter the date in the format "dd/MMM/yy h:mm a". com.atlassian.jira.issue.customfields.impl.FieldValidationException: Invalid date format. Please enter the date in the format "dd/MMM/yy h:mm a". at com.atlassian.jira.issue.customfields.impl.DateTimeCFType.getSingularObjectFromString(DateTimeCFType.java:139) at com.atlassian.jira.issue.customfields.impl.DateTimeCFType.getSingularObjectFromString(DateTimeCFType.java:56) at com.atlassian.jira.issue.customfields.impl.AbstractSingleFieldType.getValueFromCustomFieldParams(AbstractSingleFieldType.java:230) at com.atlassian.jira.plugins.importer.imports.importer.impl.customfields.CustomFieldValueFactory.prepareValueForCustomField(CustomFieldValueFactory.java:55) at com.atlassian.jira.plugins.importer.imports.importer.impl.customfields.CustomFieldsUtil.setCustomFieldValueForIssue(CustomFieldsUtil.java:188) at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.importExternalCustomFields(DefaultJiraDataImporter.java:1248) at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.createIssue(DefaultJiraDataImporter.java:899) at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.importIssues(DefaultJiraDataImporter.java:775) at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.doImport(DefaultJiraDataImporter.java:401) at com.atlassian.jira.plugins.importer.imports.importer.impl.ImporterCallable.call(ImporterCallable.java:26) at com.atlassian.jira.plugins.importer.imports.importer.impl.ImporterCallable.call(ImporterCallable.java:15) at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:528) at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:491) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at com.atlassian.jira.task.ForkedThreadExecutor$ForkedRunnableDecorator.run(ForkedThreadExecutor.java:254) at java.lang.Thread.run(Thread.java:745) {noformat} *Note:* * The problem doesn't occur when importing the custom date on the CSV into the default "Created Date" or "Resolution Date" fields. * The error also happens if using a saved configuration .txt instead of manually setting the date. *Workaround:* * On the "Look and Fee" configuration section, revert "Complete Date/Time Format" settings before importing. It can be set back again after the import completes.
    via by Mauro Fernandez Badii [Atlassian],
  • On a JIRA where the "Date/Time Formats" are customised, a csv import with DateTime fields with a format different from the default "dd/MMM/yy h:mm a" fail to import fields with a message: {quote} (!) Cannot add value [ 11/03/15 10:27 ] to CustomField Test Date in Issue with summary 'Test Issue for DateTime CSV import'. Exception Message: Invalid date format. Please enter the date in the format "dd/MMM/yy h:mm a". {quote} h4. Steps to reproduce: # Go to the "Look and Feel" section and set "Complete Date/Time Format" to: *dd/MM/yy HH:mm* # Create a Custom Field called "Test Date" and type "Date Time Picker" (no need to link it to a screen) # Go to "External System Import" -> "Import from Comma-separated values (CSV)" # Select the CSV file attached to this issue [^DateTimeTest.csv] and click Next # Select a Project and verify the "Date format" is set to *dd/MM/yy HH:mm* # Map to corresponding fields # Click Next and Begin Import *Expected Result:* Issue with DateTime field imports correctly *Actual Result:* the issue is imported successfully but the "Date Time" fields is not and the error is displayed. JIRA logs the following error: {noformat} 2015-05-21 16:10:38,088 JiraTaskExectionThread-7 WARN mbadii 970x2777x1 503sx 59.167.133.1,59.167.29.201 /secure/admin/ImporterLogsPage!import.jspa [imports.importer.impl.AbstractDataImporter$1Thread[TP-Processor68,5,main]] Cannot add value [ 11/03/15 10:27 ] to CustomField Test Date in Issue with summary 'Test Issue for DateTime CSV import'. Exception Message: Invalid date format. Please enter the date in the format "dd/MMM/yy h:mm a". com.atlassian.jira.issue.customfields.impl.FieldValidationException: Invalid date format. Please enter the date in the format "dd/MMM/yy h:mm a". at com.atlassian.jira.issue.customfields.impl.DateTimeCFType.getSingularObjectFromString(DateTimeCFType.java:139) at com.atlassian.jira.issue.customfields.impl.DateTimeCFType.getSingularObjectFromString(DateTimeCFType.java:56) at com.atlassian.jira.issue.customfields.impl.AbstractSingleFieldType.getValueFromCustomFieldParams(AbstractSingleFieldType.java:230) at com.atlassian.jira.plugins.importer.imports.importer.impl.customfields.CustomFieldValueFactory.prepareValueForCustomField(CustomFieldValueFactory.java:55) at com.atlassian.jira.plugins.importer.imports.importer.impl.customfields.CustomFieldsUtil.setCustomFieldValueForIssue(CustomFieldsUtil.java:188) at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.importExternalCustomFields(DefaultJiraDataImporter.java:1248) at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.createIssue(DefaultJiraDataImporter.java:899) at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.importIssues(DefaultJiraDataImporter.java:775) at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.doImport(DefaultJiraDataImporter.java:401) at com.atlassian.jira.plugins.importer.imports.importer.impl.ImporterCallable.call(ImporterCallable.java:26) at com.atlassian.jira.plugins.importer.imports.importer.impl.ImporterCallable.call(ImporterCallable.java:15) at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:528) at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:491) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at com.atlassian.jira.task.ForkedThreadExecutor$ForkedRunnableDecorator.run(ForkedThreadExecutor.java:254) at java.lang.Thread.run(Thread.java:745) {noformat} *Note:* * The problem doesn't occur when importing the custom date on the CSV into the default "Created Date" or "Resolution Date" fields. * The error also happens if using a saved configuration .txt instead of manually setting the date. *Workaround:* * On the "Look and Fee" configuration section, revert "Complete Date/Time Format" settings before importing. It can be set back again after the import completes.
    via by Mauro Fernandez Badii [Atlassian],
    • com.atlassian.jira.issue.customfields.impl.FieldValidationException: Invalid date format. Please enter the date in the format "dd/MMM/yy h:mm a". at com.atlassian.jira.issue.customfields.impl.DateTimeCFType.getSingularObjectFromString(DateTimeCFType.java:139) at com.atlassian.jira.issue.customfields.impl.DateTimeCFType.getSingularObjectFromString(DateTimeCFType.java:56) at com.atlassian.jira.issue.customfields.impl.AbstractSingleFieldType.getValueFromCustomFieldParams(AbstractSingleFieldType.java:230) at com.atlassian.jira.plugins.importer.imports.importer.impl.customfields.CustomFieldValueFactory.prepareValueForCustomField(CustomFieldValueFactory.java:55) at com.atlassian.jira.plugins.importer.imports.importer.impl.customfields.CustomFieldsUtil.setCustomFieldValueForIssue(CustomFieldsUtil.java:188) at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.importExternalCustomFields(DefaultJiraDataImporter.java:1248) at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.createIssue(DefaultJiraDataImporter.java:899) at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.importIssues(DefaultJiraDataImporter.java:775) at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.doImport(DefaultJiraDataImporter.java:401) at com.atlassian.jira.plugins.importer.imports.importer.impl.ImporterCallable.call(ImporterCallable.java:26) at com.atlassian.jira.plugins.importer.imports.importer.impl.ImporterCallable.call(ImporterCallable.java:15) at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:528) at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:491) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at com.atlassian.jira.task.ForkedThreadExecutor$ForkedRunnableDecorator.run(ForkedThreadExecutor.java:254) at java.lang.Thread.run(Thread.java:745)
    No Bugmate found.