theonedev/onedev · error · ExplicitException

Cannot find JIRA status of id:

Error message

Cannot find JIRA status of id: 

What it means

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.

Source

Thrown at server-plugin/server-plugin-import-jiracloud/src/main/java/io/onedev/server/plugin/imports/jiracloud/ImportServer.java:551

								description += "#### Environment\n\n" + environment;
							}
						}
						
						if (StringUtils.isNotBlank(description))
							issue.setDescription(description);
						
						String statusId = fieldsNode.get("status").get("id").asText();
						String untranslatedStatusName = untranslatedStatusNames.get(statusId);
						if (untranslatedStatusName != null) {
							String statusName = statusMappings.get(untranslatedStatusName);
							if (statusName != null) {
								issue.setState(statusName);
							} else {
								unmappedIssueStatuses.add(untranslatedStatusName);
								issue.setState(initialIssueState);
							}
						} else {
							throw new ExplicitException("Cannot find JIRA status of id: " + statusId);
						}
						
						String typeId = fieldsNode.get("issuetype").get("id").asText();
						String untranslatedTypeName = untranslatedTypeNames.get(typeId);
						if (untranslatedTypeName != null) {
							Pair<FieldSpec, String> mapped = typeMappings.get(untranslatedTypeName);
							if (mapped != null) {
								IssueField typeField = new IssueField();
								typeField.setIssue(issue);
								typeField.setName(mapped.getLeft().getName());
								typeField.setType(InputSpec.ENUMERATION);
								typeField.setValue(mapped.getRight());
								typeField.setOrdinal(mapped.getLeft().getOrdinal(mapped.getRight()));
								issue.getFields().add(typeField);
							} else {
								extraIssueInfo.put("Type", HtmlEscape.escapeHtml5(untranslatedTypeName));
								unmappedIssueTypes.add(untranslatedTypeName);
							}

View on GitHub (pinned to d44925c47c)

Solutions

  1. 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.
  2. Add an explicit issue status mapping in the import option covering the unmapped Jira status.
  3. Restart the import to refresh the project status list if statuses were recently changed in Jira.
  4. Fix or exclude the offending issue in Jira (e.g. resolve it to a normal status) and re-run the import.

Example fix

// before: issue has custom workflow status id '10001' not in project statuses
// after: add mapping in import option
statusMapping: jiraStatus="In Custom Review" -> oneDevState="In Review"
// or move issue to a standard status in Jira before importing
Defensive patterns

Strategy: try-catch

Try / catch

try { importServer.doImport(...) } catch (ExplicitException e) { if (e.getMessage().startsWith("Cannot find JIRA status of id")) { /* add status mapping or normalize workflow in Jira */ } }

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of theonedev/onedev@d44925c47c (2026-09-06). Data as JSON: /api/errors/7d415fbd93a833d3. Report an issue: GitHub.