Project importer to throw meaningful error or simple warning for field invalid context and not NullPointer

XMLWordPrintable

      NOTE: This suggestion is for JIRA Cloud. Using JIRA Server? See the corresponding suggestion.

      Upon project import, if a customfield has an invalid context please throw a better exception or perhaps even just ignore the field entirely and show a warning (since it doesn't have a valid context it doesn't show up anywhere and thus can't have any data).

      Andreas Knecht has offered the following ideas on this:

      I think the BackupOverBuilderImpl.getCustomFieldConfigurations() method could have a try catch or something for this problem and then print the appropriate warning.

      The reason for this is currently if an import is done with a field invalid context an NPE is thrown giving no more information about the problem.

      Current error:

      Caused by: java.lang.NullPointerException
      	at com.atlassian.jira.imports.project.core.BackupOverviewBuilderImpl.getIssueTypesList(BackupOverviewBuilderImpl.java:282)
      	at com.atlassian.jira.imports.project.core.BackupOverviewBuilderImpl.getCustomFieldConfigurations(BackupOverviewBuilderImpl.java:220)
      	at com.atlassian.jira.imports.project.core.BackupOverviewBuilderImpl.getProjects(BackupOverviewBuilderImpl.java:187)
      	at com.atlassian.jira.imports.project.core.BackupOverviewBuilderImpl.getBackupOverview(BackupOverviewBuilderImpl.java:115)
      	at com.atlassian.jira.imports.project.handler.BackupOverviewHandler.getBackupOverview(BackupOverviewHandler.java:28)
      	at com.atlassian.jira.imports.project.DefaultProjectImportManager.getBackupOverview(DefaultProjectImportManager.java:190)
      	at com.atlassian.jira.bc.imports.project.DefaultProjectImportService.getBackupOverview(DefaultProjectImportService.java:180)
      	at com.atlassian.jira.web.action.admin.importer.project.ProjectImportSelectBackup$BackupOverviewCallable.call(ProjectImportSelectBackup.java:236)
      	at com.atlassian.jira.web.action.admin.importer.project.ProjectImportSelectBackup$BackupOverviewCallable.call(ProjectImportSelectBackup.java:224)
      	at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:358)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      

            Assignee:
            Oswaldo Hernandez (Inactive)
            Reporter:
            Michael Andreacchio
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: