{"record":{"id":"5854eac8b436e5f4","repo":"theonedev/onedev","slug":"no-field-spec-found-5854ea","errorCode":null,"errorMessage":"No field spec found: ","messagePattern":"No field spec found: ","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":441,"sourceCode":"\t\t\tMap<String, Optional<Long>> userIds, boolean dryRun, TaskLogger logger) {\n\t\tIssueService issueService = OneDev.getInstance(IssueService.class);\n\t\tClient client = newClient();\n\t\ttry {\n\t\t\tSet<String> unmappedIssueStatuses = new HashSet<>();\n\t\t\tSet<String> unmappedIssueTypes = new HashSet<>();\n\t\t\tSet<String> unmappedIssuePriorities = new HashSet<>();\n\t\t\tSet<String> nonExistentLogins = new HashSet<>();\n\t\t\tSet<String> tooLargeAttachments = new LinkedHashSet<>();\n\t\t\tSet<String> errorAttachments = new HashSet<>();\n\t\t\t\n\t\t\tMap<String, Pair<FieldSpec, String>> typeMappings = new HashMap<>();\n\t\t\t\n\t\t\tfor (IssueTypeMapping mapping: option.getIssueTypeMappings()) {\n\t\t\t\tString oneDevFieldName = StringUtils.substringBefore(mapping.getOneDevIssueField(), \"::\");\n\t\t\t\tString oneDevFieldValue = StringUtils.substringAfter(mapping.getOneDevIssueField(), \"::\");\n\t\t\t\tFieldSpec fieldSpec = getIssueSetting().getFieldSpec(oneDevFieldName);\n\t\t\t\tif (fieldSpec == null)\n\t\t\t\t\tthrow new ExplicitException(\"No field spec found: \" + oneDevFieldName);\n\t\t\t\ttypeMappings.put(mapping.getJiraIssueType(), new Pair<>(fieldSpec, oneDevFieldValue));\n\t\t\t}\n\t\t\t\n\t\t\tMap<String, Pair<FieldSpec, String>> priorityMappings = new HashMap<>();\n\t\t\t\n\t\t\tfor (IssuePriorityMapping mapping: option.getIssuePriorityMappings()) {\n\t\t\t\tString oneDevFieldName = StringUtils.substringBefore(mapping.getOneDevIssueField(), \"::\");\n\t\t\t\tString oneDevFieldValue = StringUtils.substringAfter(mapping.getOneDevIssueField(), \"::\");\n\t\t\t\tFieldSpec fieldSpec = getIssueSetting().getFieldSpec(oneDevFieldName);\n\t\t\t\tif (fieldSpec == null)\n\t\t\t\t\tthrow new ExplicitException(\"No field spec found: \" + oneDevFieldName);\n\t\t\t\tpriorityMappings.put(mapping.getJiraIssuePriority(), new Pair<>(fieldSpec, oneDevFieldValue));\n\t\t\t}\n\t\t\t\n\t\t\tString initialIssueState = getIssueSetting().getInitialStateSpec().getName();\n\t\t\t\t\n\t\t\tList<Issue> issues = new ArrayList<>();\n\t\t\t","sourceCodeStart":423,"sourceCodeEnd":459,"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#L423-L459","documentation":"Raised in importIssues (via doImport) while building type mappings: each IssueTypeMapping names a OneDev issue field as \"name::value\"; the code splits off the name, looks it up in the project's issue setting via getIssueSetting().getFieldSpec(name), and throws this ExplicitException when no such field spec is defined in the target project. The mapping cannot be applied without an existing field spec.","triggerScenarios":"importIssues -> option.getIssueTypeMappings() loop where mapping.getOneDevIssueField()'s part before '::' is not found by getIssueSetting().getFieldSpec() — the mapped OneDev field name does not exist (or is not a custom field spec) in the target project's Issue Settings custom fields.","commonSituations":"Mapping references a custom field deleted from the target project after the import option was created; field defined in a different project than the import target; field name typo or trailing whitespace; importing into a freshly created project that has no custom fields yet.","solutions":["Add the missing custom field (Issue Settings -> Custom Fields) to the target project with exactly the mapped name, then re-run the import.","Fix the mapping's OneDev issue field value to use an existing field spec's exact name, keeping the \"Name::Value\" format.","If the field belongs to another project, either run the import against that project or replicate the field spec in the target.","Refresh the import option UI so its field dropdown reloads the current field specs and pick from it rather than typing a name."],"exampleFix":"// before\nmapping.setOneDevIssueField(\"Story Points::3\");   // no 'Story Points' spec in target\n// after: create the spec first, or use existing field\nmapping.setOneDevIssueField(\"Estimation::3\");     // 'Estimation' spec exists","handlingStrategy":"validation","validationCode":"String fieldName = StringUtils.substringBefore(mapping.getOneDevIssueField(), \"::\");\nif (issueSetting.getFieldSpec(fieldName) == null)\n    throw new IllegalArgumentException(\"Field spec missing in target project: \" + fieldName);","typeGuard":null,"tryCatchPattern":"try { importServer.doImport(...) } catch (ExplicitException e) { if (e.getMessage().startsWith(\"No field spec found\")) { /* create field or fix mapping */ } }","preventionTips":["Create all custom field specs in the target project before configuring mappings.","Pick field names from the option UI dropdown instead of typing.","Re-check mappings after any issue-setting changes."],"tags":["import","jira-cloud","field-spec","configuration"],"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-14T05:17:10.506Z"}