Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-13792

JSON File Example provided on JIRA 7 documentation is not compatible with JIRA 7.

      Summary

      JSON File Example provided on JIRA 7 documentation is not compatible with JIRA 7.

      Steps to Reproduce

      Attempt to import a project using the JSON Source Example (Project Key and Issue Key) provided on Importing data from JSON documentation

      {
          "projects": [
              {
                  "name": "Sample data",
                  "key": "SAM",
                  "issues": [
                      {
                          "key" : "SAM-123",
                          "status" : "Open",
                          "reporter" : "admin",
                          "summary" : "Parent case",
                          "externalId": "123"
                      }
                  ]
              }
          ]
      }
      

      Expected Results

      To have the project created and imported properly.

      Actual Results

      The project is not imported since it's missing the project type, giving the error below:

      2016-06-10 15:08:07,044 INFO - ------------------------------
      2016-06-10 15:08:07,044 INFO - Importing: Users
      2016-06-10 15:08:07,044 INFO - ------------------------------
      2016-06-10 15:08:07,044 INFO - Only new items will be imported
      2016-06-10 15:08:07,044 INFO - 0 users associated with import. All of them imported as inactive, this can be changed after import in User Access step.
      2016-06-10 15:08:07,044 INFO - ------------------------------
      2016-06-10 15:08:07,044 INFO - Finished Importing : Users
      2016-06-10 15:08:07,044 INFO - ------------------------------
      2016-06-10 15:08:07,044 INFO - 0 users successfully created.
      2016-06-10 15:08:07,044 INFO - Retrieving projects...
      2016-06-10 15:08:07,045 ERROR - Unexpected failure occurred. Importer will stop immediately. Data may be in an unstable state
      java.lang.Exception: Unable to import Project ExternalProject{id='null', key='SAM', externalName='null', name='Sample data'}
      	at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.importProject(DefaultJiraDataImporter.java:648)
      	at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.doImport(DefaultJiraDataImporter.java:357)
      	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:538)
      	at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:501)
      	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:254)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: com.atlassian.jira.plugins.importer.external.ExternalException: Unable to create project: ExternalProject{id='null', key='SAM', externalName='null', name='Sample data'}
      	at com.atlassian.jira.plugins.importer.managers.CreateProjectManagerImpl.createProject(CreateProjectManagerImpl.java:95)
      	at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.importProject(DefaultJiraDataImporter.java:633)
      	... 10 more
      Caused by: com.atlassian.jira.exception.CreateException: An invalid project type was specified. Unfortunately you can't create a project without a project type. Please talk to your JIRA administrator for help.
      	at com.atlassian.jira.plugins.importer.managers.CreateProjectManagerImpl.createProject(CreateProjectManagerImpl.java:82)
      	... 11 more
      2016-06-10 15:08:07,045 INFO - No issues need to be reindexed.
      

      Solution / Workaround

      Include the project type as per JSON below:

      {
          "projects": [
              {
                  "name": "Sample data",
                  "key": "SAM",
                  "type": "software",
                  "issues": [
                      {
                          "key" : "SAM-123",
                          "status" : "Open",
                          "reporter" : "admin",
                          "summary" : "Parent case",
                          "externalId": "123"
                      }
                  ]
              }
          ]
      }
      

            [JSWSERVER-13792] JSON File Example provided on JIRA 7 documentation is not compatible with JIRA 7.

            set-jac-bot made changes -
            Bugfix Automation Bot made changes -
            Minimum Version New: 7
            Owen made changes -
            Workflow Original: JAC Bug Workflow v2 [ 2856056 ] New: JAC Bug Workflow v3 [ 2936015 ]
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]
            Owen made changes -
            Symptom Severity Original: Minor [ 14432 ] New: Severity 3 - Minor [ 15832 ]
            Owen made changes -
            Workflow Original: JIRA Bug Workflow w Kanban v7 - Restricted [ 2546238 ] New: JAC Bug Workflow v2 [ 2856056 ]
            Tomasz Bartyzel made changes -
            Fix Version/s New: 7.12.0 [ 80803 ]
            Fix Version/s New: 7.6.0 [ 75172 ]
            Resolution New: Fixed [ 1 ]
            Status Original: Verified [ 10005 ] New: Resolved [ 5 ]
            Tomasz Bartyzel made changes -
            Assignee Original: Wazza [ wthompson ] New: Tomasz Bartyzel [ tbartyzel ]
            Kamil Kolonko made changes -
            Affects Version/s New: 7.1.0 [ 59897 ]
            Affects Version/s Original: 7.1.0 Server [ 61099 ]
            Ignat (Inactive) made changes -
            Workflow Original: JIRA Bug Workflow w Kanban v6 - Restricted [ 1545908 ] New: JIRA Bug Workflow w Kanban v7 - Restricted [ 2546238 ]
            Robin Reidl (Inactive) made changes -
            Labels Original: affects-cloud affects-server ecosystem fixme New: affects-cloud ecosystem fixme

              tbartyzel Tomasz Bartyzel
              lfagundes Luciano Fagundes (Inactive)
              Affected customers:
              0 This affects my team
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: