Unable to create a new project due to duplicate status
プラットフォームについて: 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 は除く
要約
Unable to create a new project in Jira Service Management (formerly Jira Service Desk), getting "Hmm... We couldn't create your project due to an unknown error. Try refreshing the page to start again." error:
環境
Jira Service Management / Jira Service Desk
診断
The following exception appears in the log on trying to create a project:
Diagnosis Error 1:
2021-01-29 14:55:23,093+1100 http-nio-8080-exec-23 ERROR username 895x2038x1 12w37dm 0:0:0:0:0:0:0:1 /rest/project-templates/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.IllegalStateException: Duplicate key 10800
at java.util.stream.Collectors.lambda$throwingMerger$0(Collectors.java:133)
at java.util.HashMap.merge(HashMap.java:1254)
at java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1320)
at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
at com.google.common.collect.CollectSpliterators$1WithCharacteristics.lambda$forEachRemaining$1(CollectSpliterators.java:64)
at java.util.stream.Streams$RangeIntSpliterator.forEachRemaining(Streams.java:110)
at com.google.common.collect.CollectSpliterators$1WithCharacteristics.forEachRemaining(CollectSpliterators.java:64)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at com.atlassian.servicedesk.internal.manager.WorkflowImporterService.findOrCreateStatus(WorkflowImporterService.java:286)
at com.atlassian.servicedesk.internal.manager.WorkflowImporterService.createStatusMapping(WorkflowImporterService.java:247)
at com.atlassian.servicedesk.internal.manager.WorkflowImporterService.lambda$parseWorkflowForStatusMapping$4(WorkflowImporterService.java:236)
Diagnosis Error 2
2021-01-29 14:55:23,093+1100 http-nio-8080-exec-23 ERROR username 895x2038x1 12w37dm 0:0:0:0:0:0:0:1 rest/project-templates/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.IllegalStateException: Duplicate key website setup (attempted merging values 12608 and 12705) ... at com.atlassian.servicedesk.internal.manager.WorkflowImporterService.findOrCreateStatus(WorkflowImporterService.java:286) at com.atlassian.servicedesk.internal.manager.WorkflowImporterService.createStatusMapping(WorkflowImporterService.java:247) at com.atlassian.servicedesk.internal.manager.WorkflowImporterService.lambda$parseWorkflowForStatusMapping$4(WorkflowImporterService.java:236) ... at com.atlassian.servicedesk.internal.manager.WorkflowImporterService.parseWorkflowForStatusMapping(WorkflowImporterService.java:237)
原因
The key here is this string from the above log snippet:
at com.atlassian.servicedesk.internal.manager.WorkflowImporterService.createStatusMapping(WorkflowImporterService.java:247)
Jira is unable to create a status mapping due to a duplicate status under ⚙ > Issues > Statuses
For example, it may look like this:
*Please note:* The status name is case insensitive, this error can occur for duplicate status names using different cases. For help with finding the problematic statuses, use the below query:
select id,pname from issuestatus where id in (ID 1 from error,ID 2 from error)
ソリューション
Rename one of the statuses returned above to have a different name, as status name has to be unique.