We couldn't load all Actvitity tabs. Refresh the page to try again.
If the problem persists, contact your Jira admin.
IMPORTANT: JAC is a Public system and anyone on the internet will be able to view the data in the created JAC tickets. Please don’t include Customer or Sensitive data in the JAC ticket.
Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-16042

The JSON import fails to complete if the case of any of the status from the JSON file doesn't match the case of the corresponding status in the Project Workflow

      Summary

      The JSON import fails to complete if the case of any of the status from the JSON file doesn't match the case of the corresponding status in the Project Workflow.

      Steps to Reproduce

      • Create a Workflow in a JIRA instance (for example 7.4.1) that contains a status "ON HOLD"
      • Create a JSON file containing an issue that has the status "On Hold" in the history. For example:
        {
            "author": "c1111",
            "created": "2014-05-31T18:00:00.000+0200",
            "items": [
                {
                    "fieldType": "jira",
                    "field": "status",
                    "fromString": "On Hold",
                    "toString": "On Hold"
                }
            ]
        }
        
      • Attempt to import the JSON file.

      Expected Results

       

      • The import should complete successfully without any error despite the case difference between the statuses "On Hold" and "ON HOLD", since JIRA doesn't allow two statuses which differ only in casing (JIRA statuses are case insensitive)
      • The issue should be imported with its complete history
      • For now, until this issue is resolved, we might want to modify the JSON import documentation 
        • to reflect the fact that the import is currently case sensitive
        • to let the JIRA users know that the status case should match between the JSON file and the statuses defined in the JIRA instance where the import is performed 

      Actual Results

      The history of this issue is not completely imported (all the history is imported up to the status change to "On Hold").
      The import page reports the error "Unexpected failure occurred. Importer will stop immediately. Data may be in an unstable state".

      The generic error below can be found in the import log:

      2017-08-04 10:45:17,076 ERROR - Unexpected failure occurred. Importer will stop immediately. Data may be in an unstable state
      java.util.NoSuchElementException
          at com.google.common.collect.AbstractIterator.next(AbstractIterator.java:154)
          at com.google.common.collect.Iterators.find(Iterators.java:717)
          at com.google.common.collect.Iterables.find(Iterables.java:646)
          at com.atlassian.jira.plugins.importer.imports.importer.impl.systemfields.StatusHistoryItemHandler.mapValue(StatusHistoryItemHandler.java:39)
          at com.atlassian.jira.plugins.importer.imports.importer.impl.AbstractHistoryItemValueMapper.mapValueWhenApplicable(AbstractHistoryItemValueMapper.java:32)
          at com.atlassian.jira.plugins.importer.imports.importer.impl.AbstractHistoryItemValueMapper.rewriteHistoryItem(AbstractHistoryItemValueMapper.java:13)
          at com.atlassian.jira.plugins.importer.imports.importer.impl.OfBizHistoryImporter.importHistory(OfBizHistoryImporter.java:88)
          at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.createIssue(DefaultJiraDataImporter.java:994)
          at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.importIssues(DefaultJiraDataImporter.java:797)
          at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.doImport(DefaultJiraDataImporter.java:414)
          at com.atlassian.jira.plugins.importer.imports.importer.impl.ImporterCallable.call(ImporterCallable.java:26)
          at com.atlassian.jira.plugins.importer.imports.importer.impl.ImporterCallable.call(ImporterCallable.java:15)
          at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:458)
          at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:426)
          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:745)
      

      Solution / Workaround

      Make sure that all the statuses from the JSON file match the statuses (with the same case) defined in the JIRA instance where the import is performed.
      Taking the example provided above, the history should be changed as follows:

      {
          "author": "c1111",
          "created": "2014-05-31T18:00:00.000+0200",
          "items": [
              {
                  "fieldType": "jira",
                  "field": "status",
                  "fromString": "ON HOLD",
                  "toString": "ON HOLD"
              }
          ]
      }
      

            Loading...
            IMPORTANT: JAC is a Public system and anyone on the internet will be able to view the data in the created JAC tickets. Please don’t include Customer or Sensitive data in the JAC ticket.
            Uploaded image for project: 'Jira Software Data Center'
            1. Jira Software Data Center
            2. JSWSERVER-16042

            The JSON import fails to complete if the case of any of the status from the JSON file doesn't match the case of the corresponding status in the Project Workflow

                Summary

                The JSON import fails to complete if the case of any of the status from the JSON file doesn't match the case of the corresponding status in the Project Workflow.

                Steps to Reproduce

                • Create a Workflow in a JIRA instance (for example 7.4.1) that contains a status "ON HOLD"
                • Create a JSON file containing an issue that has the status "On Hold" in the history. For example:
                  {
                      "author": "c1111",
                      "created": "2014-05-31T18:00:00.000+0200",
                      "items": [
                          {
                              "fieldType": "jira",
                              "field": "status",
                              "fromString": "On Hold",
                              "toString": "On Hold"
                          }
                      ]
                  }
                  
                • Attempt to import the JSON file.

                Expected Results

                 

                • The import should complete successfully without any error despite the case difference between the statuses "On Hold" and "ON HOLD", since JIRA doesn't allow two statuses which differ only in casing (JIRA statuses are case insensitive)
                • The issue should be imported with its complete history
                • For now, until this issue is resolved, we might want to modify the JSON import documentation 
                  • to reflect the fact that the import is currently case sensitive
                  • to let the JIRA users know that the status case should match between the JSON file and the statuses defined in the JIRA instance where the import is performed 

                Actual Results

                The history of this issue is not completely imported (all the history is imported up to the status change to "On Hold").
                The import page reports the error "Unexpected failure occurred. Importer will stop immediately. Data may be in an unstable state".

                The generic error below can be found in the import log:

                2017-08-04 10:45:17,076 ERROR - Unexpected failure occurred. Importer will stop immediately. Data may be in an unstable state
                java.util.NoSuchElementException
                    at com.google.common.collect.AbstractIterator.next(AbstractIterator.java:154)
                    at com.google.common.collect.Iterators.find(Iterators.java:717)
                    at com.google.common.collect.Iterables.find(Iterables.java:646)
                    at com.atlassian.jira.plugins.importer.imports.importer.impl.systemfields.StatusHistoryItemHandler.mapValue(StatusHistoryItemHandler.java:39)
                    at com.atlassian.jira.plugins.importer.imports.importer.impl.AbstractHistoryItemValueMapper.mapValueWhenApplicable(AbstractHistoryItemValueMapper.java:32)
                    at com.atlassian.jira.plugins.importer.imports.importer.impl.AbstractHistoryItemValueMapper.rewriteHistoryItem(AbstractHistoryItemValueMapper.java:13)
                    at com.atlassian.jira.plugins.importer.imports.importer.impl.OfBizHistoryImporter.importHistory(OfBizHistoryImporter.java:88)
                    at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.createIssue(DefaultJiraDataImporter.java:994)
                    at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.importIssues(DefaultJiraDataImporter.java:797)
                    at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.doImport(DefaultJiraDataImporter.java:414)
                    at com.atlassian.jira.plugins.importer.imports.importer.impl.ImporterCallable.call(ImporterCallable.java:26)
                    at com.atlassian.jira.plugins.importer.imports.importer.impl.ImporterCallable.call(ImporterCallable.java:15)
                    at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:458)
                    at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:426)
                    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:745)
                

                Solution / Workaround

                Make sure that all the statuses from the JSON file match the statuses (with the same case) defined in the JIRA instance where the import is performed.
                Taking the example provided above, the history should be changed as follows:

                {
                    "author": "c1111",
                    "created": "2014-05-31T18:00:00.000+0200",
                    "items": [
                        {
                            "fieldType": "jira",
                            "field": "status",
                            "fromString": "ON HOLD",
                            "toString": "ON HOLD"
                        }
                    ]
                }
                

                        wthompson Wazza
                        jrey Julien Rey
                        Affected customers:
                        4 This affects my team
                        Watchers:
                        2 Start watching this issue

                          Created:
                          Updated:

                              wthompson Wazza
                              jrey Julien Rey
                              Affected customers:
                              4 Vote for this issue
                              Watchers:
                              2 Start watching this issue

                                Created:
                                Updated: