Custom fields causing format errors

Issue #21 resolved
Stuart Corcoran created an issue

I'm attempting to import standard and custom fields. The custom fields all cause errors. In the log below

customfield_10600 = Closed time whose value is selected via a Date Time Range picker. customfield_10007 = a JIRA Agile Sprint field (Sprint name) customfield_10008 = a Epic Link Relationship field with Epic Link

I've tried many combinations of date/time and text formatting of these values in the Excel file, but the errors persist. Any advice on getting this to work?

thanks, Stuart

2015-07-27 10:58:56,946 DEBUG [ForkJoinPool-1-worker-1] ImportSwingApp$$anon$21.applyOrElse(214) | Mon Jul 27 10:58:56 PDT 2015 file:///C:/Users/Stuart/Documents/GCI/Misc/Jira import/import2.xlsx normalization success..!

2015-07-27 10:58:56,946 DEBUG [ForkJoinPool-1-worker-1] ImportSwingApp$$anon$21.applyOrElse(214) | Mon Jul 27 10:58:56 PDT 2015 file:///C:/Users/Stuart/Documents/GCI/Misc/Jira import/import2.xlsx normalization success..!

2015-07-27 10:58:56,965 FATAL [pool-12-thread-1] AbstractImportManager.setDateTypeCustomField(532) | Error in parsing date for custom field customfield_10600, value 42212.455555555556 java.text.ParseException: Unparseable date: "42212.455555555556" at java.text.DateFormat.parse(Unknown Source) at com.thed.service.impl.zie.AbstractImportManager.setDateTypeCustomField(AbstractImportManager.java:530) at com.thed.service.impl.zie.AbstractImportManager.populateCustomField(AbstractImportManager.java:519) at com.thed.service.impl.zie.TestcaseImportManagerImpl.saveTestCase(TestcaseImportManagerImpl.java:929) at com.thed.service.impl.zie.TestcaseImportManagerImpl.importFileByChange(TestcaseImportManagerImpl.java:527) at com.thed.service.impl.zie.TestcaseImportManagerImpl.importFileById(TestcaseImportManagerImpl.java:445) at com.thed.service.impl.zie.AbstractImportManager.importSingleFiles(AbstractImportManager.java:159) at com.thed.service.impl.zie.AbstractImportManager.importAllFiles(AbstractImportManager.java:80) at com.thed.zfj.rest.JiraService$.startImport(JIRAServiceImpl.scala:99) at com.thed.zfj.ui.ImportSwingApp$BaseMappingImporter$$anon$32.call(ImportSwingApp.scala:457) at com.thed.zfj.ui.ImportSwingApp$BaseMappingImporter$$anon$32.call(ImportSwingApp.scala:454) at scala.actors.threadpool.FutureTask.run(FutureTask.java:178) at scala.actors.threadpool.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1060) at scala.actors.threadpool.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:574) at java.lang.Thread.run(Unknown Source) 2015-07-27 10:58:58,035 DEBUG [ForkJoinPool-1-worker-11] ImportSwingApp$$anon$21.applyOrElse(214) | Mon Jul 27 10:58:58 PDT 2015 Unable to add testcase ending at rowNumber - 6. Error:Unexpected response code: 400 {"errorMessages":[],"errors":{"customfield_10600":"Error parsing time: 42212.455555555556","customfield_10007":"Operation value must be a string"}}

2015-07-27 10:58:58,035 ERROR [pool-12-thread-1] TestcaseImportManagerImpl.saveTestCase(967) | dispatch.classic.StatusCode: Unexpected response code: 400 {"errorMessages":[],"errors":{"customfield_10600":"Error parsing time: 42212.455555555556","customfield_10007":"Operation value must be a string"}} at dispatch.classic.HttpExecutor$$anonfun$1.apply(executor.scala:53) at dispatch.classic.HttpExecutor$$anonfun$1.apply(executor.scala:50) at dispatch.classic.HttpExecutor$$anonfun$x$2.apply(executor.scala:41) at dispatch.classic.HttpExecutor$$anonfun$x$2.apply(executor.scala:36) at dispatch.classic.BlockingHttp$$anonfun$execute$1.apply(Http.scala:54) at dispatch.classic.Http.pack(Http.scala:25) at dispatch.classic.BlockingHttp$class.execute(Http.scala:53) at dispatch.classic.Http.execute(Http.scala:21) at dispatch.classic.HttpExecutor$class.x(executor.scala:36) at dispatch.classic.Http.x(Http.scala:21) at dispatch.classic.HttpExecutor$class.when(executor.scala:50) at dispatch.classic.Http.when(Http.scala:21) at dispatch.classic.HttpExecutor$class.apply(executor.scala:60) at dispatch.classic.Http.apply(Http.scala:21) at com.thed.zfj.rest.JiraService$.saveTestcase(JIRAServiceImpl.scala:196) at com.thed.zfj.rest.JiraService$.saveTestcase(JIRAServiceImpl.scala:163) at com.thed.zfj.rest.JiraService.saveTestcase(JIRAServiceImpl.scala) at com.thed.service.impl.zie.TestcaseImportManagerImpl.saveTestCase(TestcaseImportManagerImpl.java:954) at com.thed.service.impl.zie.TestcaseImportManagerImpl.importFileByChange(TestcaseImportManagerImpl.java:527) at com.thed.service.impl.zie.TestcaseImportManagerImpl.importFileById(TestcaseImportManagerImpl.java:445) at com.thed.service.impl.zie.AbstractImportManager.importSingleFiles(AbstractImportManager.java:159) at com.thed.service.impl.zie.AbstractImportManager.importAllFiles(AbstractImportManager.java:80) at com.thed.zfj.rest.JiraService$.startImport(JIRAServiceImpl.scala:99) at com.thed.zfj.ui.ImportSwingApp$BaseMappingImporter$$anon$32.call(ImportSwingApp.scala:457) at com.thed.zfj.ui.ImportSwingApp$BaseMappingImporter$$anon$32.call(ImportSwingApp.scala:454) at scala.actors.threadpool.FutureTask.run(FutureTask.java:178) at scala.actors.threadpool.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1060) at scala.actors.threadpool.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:574) at java.lang.Thread.run(Unknown Source) 2015-07-27 10:58:58,035 DEBUG [ForkJoinPool-1-worker-11] ImportSwingApp$$anon$21.applyOrElse(214) | Mon Jul 27 10:58:58 PDT 2015 Unable to add testcase ending at rowNumber - 6. Error:Unexpected response code: 400 {"errorMessages":[],"errors":{"customfield_10600":"Error parsing time: 42212.455555555556","customfield_10007":"Operation value must be a string"}}

2015-07-27 10:58:58,044 DEBUG [ForkJoinPool-1-worker-1] ImportSwingApp$$anon$21.applyOrElse(214) | Mon Jul 27 10:58:58 PDT 2015 import2.xlsx imported successfully..!

2015-07-27 10:58:58,044 DEBUG [ForkJoinPool-1-worker-1] ImportSwingApp$$anon$21.applyOrElse(214) | Mon Jul 27 10:58:58 PDT 2015 import2.xlsx imported successfully..!

Comments (5)

  1. Stuart Corcoran reporter

    Just saw update 34 from last week should address 2 of the 3 above issues. I'll try that.

    Still need advice on the date/time field.

  2. ShaileshM

    @stuart_corcoran Default supported dateFormat is ISO format yyyy-MM-dd'T'HH:mm:ssZZ, try with tthat. (Make sure its stored as String in excel (not as date))

    For custom format, you can set a environment variable DATE_TIME_FORMAT while you launch the jar file.

    java -DDATE_TIME_FORMAT="yyyy-MM-dd" -jar zfj-importer-utility-0.34.jar

  3. Stuart Corcoran reporter

    Thanks. I think making it text helped in the sense that the import succeeded with no error. However the field wasn't populated. Upon further reflection I don't think the scenario I'm trying to test is valid. So no issue for now.

  4. Log in to comment