Uploaded image for project: 'Jira Platform Cloud'
  1. Jira Platform Cloud
  2. JRACLOUD-67557

Importing from JIRA Server 7.5.0 to Cloud with Custom Field Values fails

XMLWordPrintable

      Summary

      When importing from a JIRA Server 7.5.0 that has a custom field with values set the import fails. This does not happen if importing from JIRA 7.4.x or earlier.

      This is because previous versions of JIRA added lines like this to every custom field value:

      <CustomFieldValue id="10001" issue="10000" customfield="10007" stringvalue="10001"/>

      However, in 7.5.0, the updated value is added:

      <CustomFieldValue id="10000" issue="10000" customfield="10007" updated="1505744146369" stringvalue="10000"/>

      JIRA is expecting a date format for 'updated', not a number and it fails with either of these two errors:

      1. Error 1
        • Errors
          • Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff]
      2. Error 2
        • Import error
          • There was an error importing file Test_select_cf.zip: Validation failed. Following issues were reported:
          • Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff]

      Steps to Reproduce

      1. Install a JIRA 7.5.x Server
      2. Create a custom field (only tested with Select field, single option)
      3. Create a project and an issue and add a value to field in this issue
      4. Generate a backup
      5. Try to import it to JIRA Cloud

      Expected Results

      Import works

      Actual Results

      Import fails with either of the errors below.
      Error 1:

      2017-09-18 11:19:16.559639500 java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff]
      2017-09-18 11:19:16.559640500       at java.sql.Timestamp.valueOf(Timestamp.java:204)
      2017-09-18 11:19:16.559641500       at org.ofbiz.core.entity.GenericEntity.setString(GenericEntity.java:376)
      2017-09-18 11:19:16.559647500       at com.atlassian.jira.bc.dataimport.OfbizImportHandler.parseValue(OfbizImportHandler.java:340)
      2017-09-18 11:19:16.559647500       at com.atlassian.jira.bc.dataimport.OfbizImportHandler.parseValueFailsafe(OfbizImportHandler.java:307)
      2017-09-18 11:19:16.559648500       at com.atlassian.jira.bc.dataimport.OfbizImportHandler.startElement(OfbizImportHandler.java:236)
      2017-09-18 11:19:16.559649500       at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
      2017-09-18 11:19:16.559651500       at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
      2017-09-18 11:19:16.559652500       at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
      2017-09-18 11:19:16.559656500       at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
      2017-09-18 11:19:16.559657500       at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      2017-09-18 11:19:16.559658500       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      2017-09-18 11:19:16.559658500       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      2017-09-18 11:19:16.559661500       at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      2017-09-18 11:19:16.559661500       at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      2017-09-18 11:19:16.559662500       at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
      2017-09-18 11:19:16.559662500       at com.atlassian.security.xml.RestrictedXMLReader.parse(RestrictedXMLReader.java:103)
      2017-09-18 11:19:16.559663500       at com.atlassian.jira.bc.dataimport.DefaultImportValidationService.parseXmlAndValidateBackupData(DefaultImportValidationService.java:153)
      2017-09-18 11:19:16.559674500       at com.atlassian.jira.bc.dataimport.DefaultDataImportService.parseXmlAndValidateBackupData(DefaultDataImportService.java:409)
      2017-09-18 11:19:16.559675500       at com.atlassian.jira.bc.dataimport.DefaultDataImportService.validateImport(DefaultDataImportService.java:260)
      2017-09-18 11:19:16.559680500       at com.atlassian.jira.studio.importer.StudioImport.doConfirm(StudioImport.java:144)
      2017-09-18 11:19:16.559680500       ... 3 filtered
      2017-09-18 11:19:16.559681500       at java.lang.reflect.Method.invoke(Method.java:483)
      2017-09-18 11:19:16.559681500       at webwork.util.InjectionUtils$DefaultInjectionImpl.invoke(InjectionUtils.java:70)
      2017-09-18 11:19:16.559682500       at webwork.util.InjectionUtils.invoke(InjectionUtils.java:56)
      2017-09-18 11:19:16.559682500       ... 2 filtered
      2017-09-18 11:19:16.559682500       at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:67)
      2017-09-18 11:19:16.559685500       at com.atlassian.jira.studio.importer.StudioImportBase.execute(StudioImportBase.java:40)
      2017-09-18 11:19:16.559686500       ... 7 filtered
      2017-09-18 11:19:16.559686500       at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      2017-09-18 11:19:16.559687500       at com.atlassian.jira.servlet.WebExceptionCheckingServlet.delegate(WebExceptionCheckingServlet.java:86)
      2017-09-18 11:19:16.559687500       at com.atlassian.jira.servlet.WebExceptionCheckingServlet.service(WebExceptionCheckingServlet.java:32)
      2017-09-18 11:19:16.559690500       ... 26 filtered
      2017-09-18 11:19:16.559690500       at com.atlassian.servicedesk.internal.web.ExternalCustomerLockoutFilter.doFilter(ExternalCustomerLockoutFilter.java:56)
      2017-09-18 11:19:16.559691500       ... 4 filtered
      2017-09-18 11:19:16.559691500       at com.atlassian.greenhopper.jira.filters.ClassicBoardRouter.doFilter(ClassicBoardRouter.java:56)
      2017-09-18 11:19:16.559695500       ... 8 filtered
      2017-09-18 11:19:16.559696500       at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
      2017-09-18 11:19:16.559696500       ... 20 filtered
      2017-09-18 11:19:16.559697500       at com.atlassian.jira.plugins.rest.HOT25715FixServletFilter.doFilter(HOT25715FixServletFilter.java:46)
      2017-09-18 11:19:16.559697500       ... 34 filtered
      2017-09-18 11:19:16.559700500       at com.atlassian.jira.plugins.hipchat.web.filter.TaskSchedulerFilter.doFilter(TaskSchedulerFilter.java:35)
      2017-09-18 11:19:16.559701500       ... 22 filtered
      2017-09-18 11:19:16.559701500       at com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:95)
      2017-09-18 11:19:16.559702500       at com.atlassian.jira.security.JiraSecurityFilter$$Lambda$3408/1911938627.doFilter(Unknown Source)
      2017-09-18 11:19:16.559702500       ... 1 filtered
      2017-09-18 11:19:16.559702500       at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:93)
      2017-09-18 11:19:16.559705500       ... 20 filtered
      2017-09-18 11:19:16.559705500       at com.atlassian.servicedesk.plugins.cm.internal.auth.filter.LocalServiceDeskUserAuthenticationFilter.doFilter(LocalServiceDeskUserAuthenticationFilter.java:104)
      2017-09-18 11:19:16.559707500       ... 8 filtered
      2017-09-18 11:19:16.559707500       at com.atlassian.studio.jira.homepage.CloudHomepageFilter.doFilter(CloudHomepageFilter.java:45)
      2017-09-18 11:19:16.559708500       ... 26 filtered
      2017-09-18 11:19:16.559710500       at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.lambda$invokeFilterChain$0(CustomerContextSettingFilter.java:195)
      2017-09-18 11:19:16.559714500       at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter$$Lambda$3372/1451299035.call(Unknown Source)
      2017-09-18 11:19:16.559715500       at com.atlassian.servicedesk.internal.utils.context.ReentrantThreadLocalBasedCodeContext.rteInvoke(ReentrantThreadLocalBasedCodeContext.java:141)
      2017-09-18 11:19:16.559716500       at com.atlassian.servicedesk.internal.utils.context.ReentrantThreadLocalBasedCodeContext.runOutOfContext(ReentrantThreadLocalBasedCodeContext.java:94)
      2017-09-18 11:19:16.559722500       at com.atlassian.servicedesk.internal.utils.context.CustomerContextServiceImpl.runOutOfCustomerContext(CustomerContextServiceImpl.java:65)
      2017-09-18 11:19:16.559723500       at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.outOfCustomerContext(CustomerContextSettingFilter.java:188)
      2017-09-18 11:19:16.559724500       at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilterImpl(CustomerContextSettingFilter.java:144)
      2017-09-18 11:19:16.559726500       at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilter(CustomerContextSettingFilter.java:135)
      2017-09-18 11:19:16.559745500       ... 13 filtered
      2017-09-18 11:19:16.559745500       at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
      2017-09-18 11:19:16.559746500       ... 4 filtered
      2017-09-18 11:19:16.559746500       at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:36)
      2017-09-18 11:19:16.559747500       ... 40 filtered
      2017-09-18 11:19:16.559749500       at com.atlassian.jira.util.zipkin.ZipkinTracingFilter.lambda$doFilter$1(ZipkinTracingFilter.java:52)
      2017-09-18 11:19:16.559750500       at com.atlassian.jira.util.zipkin.ZipkinTracingFilter$$Lambda$3264/603655243.doFilter(Unknown Source)
      2017-09-18 11:19:16.559751500       at com.github.kristofa.brave.servlet.BraveServletFilter.doFilter(BraveServletFilter.java:112)
      2017-09-18 11:19:16.559751500       at com.atlassian.jira.util.zipkin.ZipkinTracingFilter.doFilter(ZipkinTracingFilter.java:40)
      2017-09-18 11:19:16.559753500       ... 28 filtered
      2017-09-18 11:19:16.559754500       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      2017-09-18 11:19:16.559754500       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      2017-09-18 11:19:16.559755500       at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      2017-09-18 11:19:16.559755500       at java.lang.Thread.run(Thread.java:745)
      

      Error 2:

      {	[-]	
        	 @laas:	{	[+]	
        	}	
        	 @tag:	 micros.application	
        	 @timestamp:	 2017-09-18T14:20:11.268Z	
        	 ctx:	{	[+]	
        	}	
        	 ec2_az:	 us-east-1b	
        	 ec2_hostname:	 ip-10-124-145-42.useast.atl-inf.io	
        	 ec2_instance_id:	 i-05a9502c616e7e158	
        	 ec2_ipv4:	 10.124.145.42	
        	 ec2_stack_name:	 jira-prod-us-5--prod-east--2017-09-18-05-37-14-2017-09-18-ea782e5d4d--2017-09-18-06-03-utc--b9k4k9nj4eonp35j	
        	 env:	 prod-east	
        	 ext:	{	[+]	
        	}	
        	 hostname:	 b1a802854070	
        	 level:	 ERROR	
        	 location:	{	[+]	
        	}	
        	 logger:	 com.atlassian.jira.bc.dataimport.OfbizImportHandler	
        	 message:	 Failed to set attribute 'CustomFieldValue.updated' with value '1505744146369'. Error: Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff]	
        	 micros_deployment_id:	 b9k4k9nj4eonp35j	
        	 micros_group:	 Amq	
        	 micros_service_id:	 jira-prod-us-5	
        	 micros_service_version:	 2017-09-18-05-37-14_2017-09-18_ea782e5d4d	
        	 micros_tag:	 application	
        	 pid:	 32	
        	 product:	 jira	
        	 thread:	 sqs-consumer-thread-amq-468	
        	 time:	 2017-09-18T14:20:11Z	
        	 timestamp:	 2017-09-18T14:20:11,268Z	
      }
      

      Workaround

      None so far

        1. error_1.png
          88 kB
          Jaime S
        2. error_2.png
          158 kB
          Jaime S

              edalgliesh Eric Dalgliesh
              jsilveira Jaime S
              Votes:
              3 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: