Missing Default Priority Scheme causes Jira Service Management projects to fail to create
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
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.
*Fisheye および Crucible は除く
問題
In specific circumstances, Jira Service Management projects fail to create, and throw errors:
- When creating a Jira Service Management project from another project using a shared configuration
- When converting another project type (Business, Software) to Jira Service Management
Typically, there is no problem creating brand new Jira Service Management projects using the default templates provided by Jira.
The following appears in atlassian-jira.log:
- When creating a Service Management project from another using a shared configuration:
2019-09-30 18:23:42,674 http-nio-8041-exec-24 ERROR kliou 1103x753x1 awulaf 0:0:0:0:0:0:0:1 /rest/project-templates/1.0/createshared/12405 [c.a.jira.project.ProjectCreateRegistrarImpl] The handler with id servicedesk-project-create-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:653)
at java.util.ArrayList.get(ArrayList.java:429)
at com.atlassian.servicedesk.internal.sla.configuration.SLAGettingStartedServiceImpl.createTimeToResolutionDefaultGoals(SLAGettingStartedServiceImpl.java:969)
at com.atlassian.servicedesk.internal.sla.configuration.SLAGettingStartedServiceImpl.createTimeToResolutionMetricForExistingProject(SLAGettingStartedServiceImpl.java:308)
at com.atlassian.servicedesk.internal.sla.configuration.SLAGettingStartedServiceImpl.createSLAConfigurationForExistingProject(SLAGettingStartedServiceImpl.java:191)
at com.atlassian.servicedesk.internal.feature.gettingstarted.GettingStartedService.createSLAConfigurationForExistingProject(GettingStartedService.java:456)
at com.atlassian.servicedesk.internal.feature.gettingstarted.GettingStartedService.doCreateServiceDeskForExistingProject(GettingStartedService.java:517)
at com.atlassian.servicedesk.internal.feature.gettingstarted.GettingStartedService.lambda$createServiceDeskForExistingProject$6(GettingStartedService.java:344)
at io.atlassian.fugue.Either$Left.fold(Either.java:565)
at com.atlassian.servicedesk.internal.feature.gettingstarted.GettingStartedService.createServiceDeskForExistingProject(GettingStartedService.java:342)
at com.atlassian.servicedesk.internal.feature.gettingstarted.GettingStartedService.createServiceDeskWithSharedConfig(GettingStartedService.java:349)
at com.atlassian.servicedesk.internal.project.type.ServiceDeskProjectHelper.createServiceDeskForSharedConfigProject(ServiceDeskProjectHelper.java:45)
at com.atlassian.servicedesk.internal.project.type.ServiceDeskProjectCreateHandler.onProjectCreated(ServiceDeskProjectCreateHandler.java:46)
at com.atlassian.jira.project.ProjectCreateRegistrarImpl.notifyAllHandlers(ProjectCreateRegistrarImpl.java:35)
at com.atlassian.jira.bc.project.DefaultProjectService.notifyHandlersOfProjectCreated(DefaultProjectService.java:392)
at com.atlassian.jira.bc.project.DefaultProjectService.createProjectInternal(DefaultProjectService.java:377)
at com.atlassian.jira.bc.project.DefaultProjectService.createProject(DefaultProjectService.java:347)
- When converting a project to a Service Management project:
2019-09-30 18:21:10,488 http-nio-8041-exec-2 ERROR [c.a.j.web.servlet.InternalServerErrorServlet] {errorId=f70c6f44-f50e-46e1-94a7-043d1018ae99, interpretedMsg=, cause=java.lang.IndexOutOfBoundsException: Index: 0, Size: 0, stacktrace=java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:653) [?:1.8.0_131]
at java.util.ArrayList.get(ArrayList.java:429) [?:1.8.0_131]
at com.atlassian.servicedesk.internal.sla.configuration.SLAGettingStartedServiceImpl.createTimeToResolutionDefaultGoals(SLAGettingStartedServiceImpl.java:969) [?:?]
at com.atlassian.servicedesk.internal.sla.configuration.SLAGettingStartedServiceImpl.createTimeToResolutionMetricForExistingProject(SLAGettingStartedServiceImpl.java:308) [?:?]
at com.atlassian.servicedesk.internal.sla.configuration.SLAGettingStartedServiceImpl.createSLAConfigurationForExistingProject(SLAGettingStartedServiceImpl.java:191) [?:?]
at com.atlassian.servicedesk.internal.feature.gettingstarted.GettingStartedService.createSLAConfigurationForExistingProject(GettingStartedService.java:456) [?:?]
at com.atlassian.servicedesk.internal.feature.gettingstarted.GettingStartedService.doCreateServiceDeskForExistingProject(GettingStartedService.java:517) [?:?]
at com.atlassian.servicedesk.internal.feature.gettingstarted.GettingStartedService.lambda$createServiceDeskForExistingProject$6(GettingStartedService.java:344) [?:?]
at io.atlassian.fugue.Either$Left.fold(Either.java:565) [fugue-4.5.0.jar:?]
at com.atlassian.servicedesk.internal.feature.gettingstarted.GettingStartedService.createServiceDeskForExistingProject(GettingStartedService.java:342) [?:?]
at com.atlassian.servicedesk.internal.feature.gettingstarted.GettingStartedService.convertToServiceDesk(GettingStartedService.java:160) [?:?]
at com.atlassian.servicedesk.internal.project.type.ServiceDeskProjectHelper.convertToServiceDesk(ServiceDeskProjectHelper.java:62) [?:?]
at com.atlassian.servicedesk.internal.project.type.ServiceDeskProjectTypeUpdatedHandler.onProjectTypeUpdated(ServiceDeskProjectTypeUpdatedHandler.java:39) [?:?]
at com.atlassian.jira.project.type.ProjectTypeUpdatedRegistrarImpl.notifyAllHandlers(ProjectTypeUpdatedRegistrarImpl.java:29) [classes/:?]
at com.atlassian.jira.bc.project.DefaultProjectService.notifyProjectTypeUpdated(DefaultProjectService.java:900) [classes/:?]
at com.atlassian.jira.bc.project.DefaultProjectService.updateProject(DefaultProjectService.java:510) [classes/:?]
at com.atlassian.jira.web.action.project.EditProject.doExecute(EditProject.java:152) [classes/:?]
診断
環境
A missing Priority Scheme is causing the creation of Jira Service Management's SLA goals to fail.
Diagnostic Steps
Check that the Default Priority Scheme exists, and determine it's ID, used in the Resolution steps below:
select * from fieldconfigscheme where configname = 'Default priority scheme';
Check whether the default association for the Default Priority Scheme is missing:
select cc.* from configurationcontext cc join fieldconfigscheme fcs on cc.fieldconfigscheme = fcs.id where cc.customfield = 'priority' and cc.project is null and fcs.configname = 'Default priority scheme';
If no records are returned for either of these queries, then this KB article applies.
原因
At this time, it is not known what causes the association to be missing. Further diagnosis and testing will be necessary.
ソリューション
The missing association must be manually inserted into the database.
データベースの変更を行う場合は必ず事前にバックアップを取得してください。可能な場合は、まずステージング サーバーで SQL コマンドの変更、挿入、更新、または削除を行うようにします。
insert into configurationcontext values ((select max(cc.id)+1 from configurationcontext cc), NULL, NULL, 'priority', <ID of the Default Priority Scheme from Diagnostic Step 1>);
In order to avoid introducing integrity issues into Jira's caches, be sure to restart Jira after making this change.