{"record":{"id":"7d415fbd93a833d3","repo":"theonedev/onedev","slug":"cannot-find-jira-status-of-id","errorCode":null,"errorMessage":"Cannot find JIRA status of id: ","messagePattern":"Cannot find JIRA status of id: ","errorType":"exception","errorClass":"ExplicitException","httpStatus":null,"severity":"error","filePath":"server-plugin/server-plugin-import-jiracloud/src/main/java/io/onedev/server/plugin/imports/jiracloud/ImportServer.java","lineNumber":551,"sourceCode":"\t\t\t\t\t\t\t\tdescription += \"#### Environment\\n\\n\" + environment;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (StringUtils.isNotBlank(description))\n\t\t\t\t\t\t\tissue.setDescription(description);\n\t\t\t\t\t\t\n\t\t\t\t\t\tString statusId = fieldsNode.get(\"status\").get(\"id\").asText();\n\t\t\t\t\t\tString untranslatedStatusName = untranslatedStatusNames.get(statusId);\n\t\t\t\t\t\tif (untranslatedStatusName != null) {\n\t\t\t\t\t\t\tString statusName = statusMappings.get(untranslatedStatusName);\n\t\t\t\t\t\t\tif (statusName != null) {\n\t\t\t\t\t\t\t\tissue.setState(statusName);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tunmappedIssueStatuses.add(untranslatedStatusName);\n\t\t\t\t\t\t\t\tissue.setState(initialIssueState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthrow new ExplicitException(\"Cannot find JIRA status of id: \" + statusId);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tString typeId = fieldsNode.get(\"issuetype\").get(\"id\").asText();\n\t\t\t\t\t\tString untranslatedTypeName = untranslatedTypeNames.get(typeId);\n\t\t\t\t\t\tif (untranslatedTypeName != null) {\n\t\t\t\t\t\t\tPair<FieldSpec, String> mapped = typeMappings.get(untranslatedTypeName);\n\t\t\t\t\t\t\tif (mapped != null) {\n\t\t\t\t\t\t\t\tIssueField typeField = new IssueField();\n\t\t\t\t\t\t\t\ttypeField.setIssue(issue);\n\t\t\t\t\t\t\t\ttypeField.setName(mapped.getLeft().getName());\n\t\t\t\t\t\t\t\ttypeField.setType(InputSpec.ENUMERATION);\n\t\t\t\t\t\t\t\ttypeField.setValue(mapped.getRight());\n\t\t\t\t\t\t\t\ttypeField.setOrdinal(mapped.getLeft().getOrdinal(mapped.getRight()));\n\t\t\t\t\t\t\t\tissue.getFields().add(typeField);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\textraIssueInfo.put(\"Type\", HtmlEscape.escapeHtml5(untranslatedTypeName));\n\t\t\t\t\t\t\t\tunmappedIssueTypes.add(untranslatedTypeName);\n\t\t\t\t\t\t\t}","sourceCodeStart":533,"sourceCodeEnd":569,"githubUrl":"https://github.com/theonedev/onedev/blob/d44925c47c37992c828ea673a5f9620539bc3ff2/server-plugin/server-plugin-import-jiracloud/src/main/java/io/onedev/server/plugin/imports/jiracloud/ImportServer.java#L533-L569","documentation":"During issue import (consume), each issue's status is matched by its Jira status id against the untranslatedStatusNames map built from the project's statuses. If the status id is present but not among the statuses Jira reported for this project, the import throws this ExplicitException and aborts.","triggerScenarios":"consume() reads the status id from the issue fields node, the id is not null, but untranslatedStatusNames.get(statusId) is null — the Jira issue references a status id that the project's status list did not include.","commonSituations":"Issue uses a workflow status not exposed in the fetched project status list; status deleted/renamed in Jira between listing and issue fetching; stale project metadata; issues moved between projects with different workflows.","solutions":["In Jira, move issues to a standard status or add the missing status to the project's workflow so it appears in the project status list.","Add an explicit issue status mapping in the import option covering the unmapped Jira status.","Restart the import to refresh the project status list if statuses were recently changed in Jira.","Fix or exclude the offending issue in Jira (e.g. resolve it to a normal status) and re-run the import."],"exampleFix":"// before: issue has custom workflow status id '10001' not in project statuses\n// after: add mapping in import option\nstatusMapping: jiraStatus=\"In Custom Review\" -> oneDevState=\"In Review\"\n// or move issue to a standard status in Jira before importing","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { importServer.doImport(...) } catch (ExplicitException e) { if (e.getMessage().startsWith(\"Cannot find JIRA status of id\")) { /* add status mapping or normalize workflow in Jira */ } }","preventionTips":["Align issue workflows so all statuses appear in the project's status list.","Add explicit status mappings for non-standard statuses.","Refresh the project status list after Jira workflow changes."],"tags":["import","jira-cloud","status","workflow"],"backgroundTag":"resource-not-found","analyzedSha":"d44925c47c37992c828ea673a5f9620539bc3ff2","analyzedAt":"2026-09-06T07:18:27.995Z","contentChangedAt":"2026-09-06T07:18:27.995Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}