Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-19699

NumberFormatException thrown when trying to import project with no assigneetype attribute set

    XMLWordPrintable

Details

    Description

      When trying to import a project with no assigneetype set, such as this:

      <Project id="13274" name="Cusco" lead="u205339" key="GRCCUS" counter="172" />

      You get a NumberFormatException when you proceed to the actual import (i.e. past overview and mapping steps):

      edu.emory.mathcs.backport.java.util.concurrent.ExecutionException: java.lang.NumberFormatException: null
              at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.getResult(FutureTask.java:301)
              at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.get(FutureTask.java:120)
              at com.atlassian.jira.task.TaskDescriptorImpl.getResult(TaskDescriptorImpl.java:113)
              at com.atlassian.jira.web.bean.TaskDescriptorBean.getResult(TaskDescriptorBean.java:78)
              at com.atlassian.jira.web.action.admin.importer.project.ProjectImportProgress.handleFinishedTask(ProjectImportProgress.java:32)
              at com.atlassian.jira.web.action.admin.importer.project.AbstractProjectImportProgress.doExecute(AbstractProjectImportProgress.java:61)
      ...
      Caused by: java.lang.NumberFormatException: null
              at java.lang.Long.parseLong(Long.java:372)
              at java.lang.Long.valueOf(Long.java:518)
              at org.ofbiz.core.entity.GenericEntity.setString(GenericEntity.java:286)
              at com.atlassian.jira.imports.project.DefaultProjectImportPersister.updateProjectDetails(DefaultProjectImportPersister.java:290)
              at com.atlassian.jira.imports.project.DefaultProjectImportManager.importProject(DefaultProjectImportManager.java:464)
              at com.atlassian.jira.bc.imports.project.DefaultProjectImportService.doImport(DefaultProjectImportService.java:423)
              at com.atlassian.jira.web.action.admin.importer.project.ProjectImportSummary$ProjectImportCallable.call(ProjectImportSummary.java:300)
              at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:360)
              at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:178)
              at edu.emory.mathcs.backport.java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442)
              at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:178)
              at com.atlassian.jira.task.ForkedThreadExecutor$ForkedRunnableDecorator.run(ForkedThreadExecutor.java:252)
      

      The presentation code of the assignee type in the Project Admin view seems to be able to handle null gracefully - the same should be done in Project Import (perhaps default to 2 = Project Lead?)

      Update

      This bug only occurs when:

      • You are overwriting an existing project
      • The system you are importing from allowed unassigned issues

      Attachments

        Activity

          People

            mtokar Michael Tokar
            mtokar Michael Tokar
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 8h
                8h