Jira Service Management, unable to create IT Service Management projects with Nullpointer exception
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
Jira is unable to create IT Service Management projects, a null pointer exception is thrown, all project related configurations are created, like workflows, schemes, etc.
The following appears exceptions appear in the atlassian-jira.log
2018-09-11 12:03:31,605 http-nio-1766-exec-9 StartTime "2018-09-11 12:03:25.193" RequestURI "/jira766/rest/project-templates/1.0/templates" QueryString "null" User "admin" ERROR admin 723x169x2 c3653j 0:0:0:0:0:0:0:1 /rest/project-templa
tes/1.0/templates [c.a.jira.project.ProjectCreateRegistrarImpl] The handler with id com.atlassian.jira.project-templates-plugin:apply-project-template-handler threw an exception while handling a notification about a project being created
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:657)
at java.util.ArrayList.get(ArrayList.java:433)
at com.atlassian.servicedesk.internal.sla.configuration.SLAGettingStartedServiceImpl.lambda$createTimeToApproveNormalChangeGoals$20(SLAGettingStartedServiceImpl.java:559)
at io.atlassian.fugue.Option$Some.forEach(Option.java:468)
at com.atlassian.servicedesk.internal.sla.configuration.SLAGettingStartedServiceImpl.createTimeToApproveNormalChangeGoals(SLAGettingStartedServiceImpl.java:540)
at com.atlassian.servicedesk.internal.sla.configuration.SLAGettingStartedServiceImpl.lambda$createTimeToApproveNormalChangeMetricForEmptyProject$18(SLAGettingStartedServiceImpl.java:529)
...
Diagnosis
Environment
- Jira Service Management installed.
- Jira is using English as default language.
- Change Type custom field introduced by Jira Service Management; has been modified to be missing the Normal change type option.
Cause
Jira Service Management code expects the Normal Change type custom field option to exist as is, modifying the Change Type custom field options to remove the ward Normal or using Translations that changes the word normal eg: to French, will cause this issue to happen.
Please check the bug report: JSDSERVER-5545 - Getting issue details... STATUS for more information.
Workaround
Before creating a new IT Service Management project, ensure that the Custom Field Change type has the option Normal in its list when using English as default language.