Uploaded image for project: 'Project Configurator - Development'
  1. Project Configurator - Development
  2. PCDEV-1197

Condition on default issue type within a scheme triggers a NPE in some cases

    Details

    • Type: Bug
    • Status: Done (View Workflow)
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 3.0.2
    • Fix Version/s: 3.0.3
    • Labels:
      None
    • Sprint:
      PC Sprint 14
    • Critical Points:
      0

      Description

      When importing a configuration implies that an existing issue type scheme will lose its default issue type (i.e. it will have no default issue type in the new configuration, but it had one in the configuration before importing) a NullPointerException like this is triggered:

      [c.a.p.operationsapi.impl.ConfigImporterTask] java.lang.NullPointerException[c.a.p.operationsapi.impl.ConfigImporterTask]
          	at com.awnaba.projectconfigurator.utils.MiscUtils.warnNameMapping(MiscUtils.java:102)
          	at com.awnaba.projectconfigurator.loaders.handlers.IssueTypeHandler.getTarget(IssueTypeHandler.java:48)
          	at com.awnaba.projectconfigurator.loaders.handlers.IssueTypeHandler.getTarget(IssueTypeHandler.java:1)
          	at com.awnaba.projectconfigurator.loaders.core.AbstractTargetHandler$1.getTarget(AbstractTargetHandler.java:50)
          	at com.awnaba.projectconfigurator.loaders.condition.ExistsCondition.isMet(ExistsCondition.java:23)
          	at com.awnaba.projectconfigurator.loaders.orchestration.FeasibleOpsAnalizer.onePass(FeasibleOpsAnalizer.java:112)
          	at com.awnaba.projectconfigurator.loaders.orchestration.FeasibleOpsAnalizer.analyze(FeasibleOpsAnalizer.java:66)
          	at com.awnaba.projectconfigurator.loaders.orchestration.ProjectConfigLoader.detectImpossibleOps(ProjectConfigLoader.java:229)
          	at com.awnaba.projectconfigurator.loaders.orchestration.ProjectConfigLoader.getOperationsTreeFromXML(ProjectConfigLoader.java:182)
          	at com.awnaba.projectconfigurator.operationsapi.impl.ConfigImporterTask.runOldStyleConfigImport(ConfigImporterTask.java:117)
          	at com.awnaba.projectconfigurator.operationsapi.impl.ConfigImporterTask.doConfigImportJobWithReturnInfo(ConfigImporterTask.java:90)
          	at com.awnaba.projectconfigurator.operationsapi.impl.ConfigImporterTask.doXmlJob(ConfigImporterTask.java:66)
          	at com.awnaba.projectconfigurator.operationsapi.impl.ConfigImporterTask.doImport(ConfigImporterTask.java:128)
          	at com.awnaba.projectconfigurator.operationsapi.impl.ProjectConfigImporterImpl$ConfigurationImportTask.call(ProjectConfigImporterImpl.java:332)
          	at com.awnaba.projectconfigurator.operationsapi.impl.ProjectConfigImporterImpl$ConfigurationImportTask.call(ProjectConfigImporterImpl.java:1)
          	at com.awnaba.projectconfigurator.longrunningtasks.TaskHelperImpl$WrappingTask.safeCall(TaskHelperImpl.java:141)
          	at com.awnaba.projectconfigurator.longrunningtasks.TaskHelperImpl$WrappingTask.call(TaskHelperImpl.java:130)
          	at com.awnaba.projectconfigurator.longrunningtasks.TaskHelperImpl$WrappingTask.call(TaskHelperImpl.java:1)
          	at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:481)
          	at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:443)
          	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:216)
          	at java.lang.Thread.run(Thread.java:748)
      

      This happens even in the simulation stage. The stack trace can be obtained form the log file, as the user will only see a screenshot like this:

      An easy workaround for this problem is to remove manually the default issue type from the scheme before the import.

        Attachments

          Structure

            Activity

              People

              Assignee:
              pmaranon Pepe Maranon Mora
              Reporter:
              pmaranon Pepe Maranon Mora
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Structure Helper Panel