-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Low
-
Affects Version/s: 7.0.1, 7.0.2, 7.0.3, 7.0.4, 7.0.5, 7.0.9, 7.0.10, 7.1.0, 7.1.1, 7.1.2
-
Component/s: Documentation
-
7
-
1
-
Severity 3 - Minor
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"
}
]
}
]
}