com.atlassian.jira.issue.customfields.impl.FieldValidationException: Invalid date format. Please enter the date in the format "dd/MMM/yy h:mm a".

Atlassian JIRA | Mauro Fernandez Badii [Atlassian] | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    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.

    Atlassian JIRA | 2 years ago | 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".
  2. 0

    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.

    Atlassian JIRA | 2 years ago | 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".

    Root Cause Analysis

    1. 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()
    2. com.atlassian.jira
      TaskManagerImpl$TaskCallableDecorator.call
      1. com.atlassian.jira.issue.customfields.impl.DateTimeCFType.getSingularObjectFromString(DateTimeCFType.java:139)
      2. com.atlassian.jira.issue.customfields.impl.DateTimeCFType.getSingularObjectFromString(DateTimeCFType.java:56)
      3. com.atlassian.jira.issue.customfields.impl.AbstractSingleFieldType.getValueFromCustomFieldParams(AbstractSingleFieldType.java:230)
      4. com.atlassian.jira.plugins.importer.imports.importer.impl.customfields.CustomFieldValueFactory.prepareValueForCustomField(CustomFieldValueFactory.java:55)
      5. com.atlassian.jira.plugins.importer.imports.importer.impl.customfields.CustomFieldsUtil.setCustomFieldValueForIssue(CustomFieldsUtil.java:188)
      6. com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.importExternalCustomFields(DefaultJiraDataImporter.java:1248)
      7. com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.createIssue(DefaultJiraDataImporter.java:899)
      8. com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.importIssues(DefaultJiraDataImporter.java:775)
      9. com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.doImport(DefaultJiraDataImporter.java:401)
      10. com.atlassian.jira.plugins.importer.imports.importer.impl.ImporterCallable.call(ImporterCallable.java:26)
      11. com.atlassian.jira.plugins.importer.imports.importer.impl.ImporterCallable.call(ImporterCallable.java:15)
      12. com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:528)
      13. com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:491)
      13 frames
    3. Java RT
      FutureTask.run
      1. java.util.concurrent.FutureTask.run(FutureTask.java:266)
      2. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      3. java.util.concurrent.FutureTask.run(FutureTask.java:266)
      3 frames
    4. com.atlassian.jira
      ForkedThreadExecutor$ForkedRunnableDecorator.run
      1. com.atlassian.jira.task.ForkedThreadExecutor$ForkedRunnableDecorator.run(ForkedThreadExecutor.java:254)
      1 frame
    5. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame