{"record":{"id":"d7651b42cb8d2d11","repo":"theonedev/onedev","slug":"undefined-custom-field","errorCode":null,"errorMessage":"Undefined custom field: ","messagePattern":"Undefined custom field: ","errorType":"exception","errorClass":"ExplicitException","httpStatus":null,"severity":"error","filePath":"server-core/src/main/java/io/onedev/server/web/page/project/issues/boards/BoardColumnPanel.java","lineNumber":454,"sourceCode":"\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\tprotected String getToState() {\n\t\t\t\t\t\t\t\t\t\t\treturn getColumn();\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tgetIssueChangeService().changeState(user, issue, getColumn(),\n\t\t\t\t\t\t\t\t\tnew HashMap<>(), transitionRef.get().getPromptFields(), \n\t\t\t\t\t\t\t\t\ttransitionRef.get().getRemoveFields(), null);\n\t\t\t\t\t\t\tcardListPanel.onCardDropped(target, issueId, cardIndex, true);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tFieldSpec fieldSpec = getIssueSetting().getFieldSpec(fieldName);\n\t\t\t\t\t\tif (fieldSpec == null)\n\t\t\t\t\t\t\tthrow new ExplicitException(_T(\"Undefined custom field: \") + fieldName);\n\n\t\t\t\t\t\tSerializable fieldBean = issue.getFieldBean(FieldUtils.getFieldBeanClass(true));\n\t\t\t\t\t\tBeanDescriptor beanDescriptor = new BeanDescriptor(fieldBean.getClass());\n\t\t\t\t\t\tbeanDescriptor.getProperty(fieldName).setPropertyValue(fieldBean, getColumn());\n\n\t\t\t\t\t\tCollection<String> dependentFields = fieldSpec.getTransitiveDependents();\n\t\t\t\t\t\tboolean hasVisibleEditableDependents = dependentFields.stream()\n\t\t\t\t\t\t\t\t.anyMatch(it -> SecurityUtils.canEditIssueField(issue.getProject(), it)\n\t\t\t\t\t\t\t\t\t\t&& FieldUtils.isFieldVisible(issue.getProject(), beanDescriptor, fieldBean, it));\n\n\t\t\t\t\t\tMap<String, Object> fieldValues = new HashMap<>();\n\t\t\t\t\t\tfieldValues.put(fieldName, getColumn());\n\n\t\t\t\t\t\tif (hasVisibleEditableDependents) {\n\t\t\t\t\t\t\tCollection<String> propertyNames = FieldUtils.getEditablePropertyNames(\n\t\t\t\t\t\t\t\t\tissue.getProject(), fieldBean.getClass(), dependentFields);\n\t\t\t\t\t\t\tclass DependentFieldsEditor extends BeanEditModalPanel<Serializable>\n\t\t\t\t\t\t\t\t\timplements ProjectAware, InputContext {","sourceCodeStart":436,"sourceCodeEnd":472,"githubUrl":"https://github.com/theonedev/onedev/blob/d44925c47c37992c828ea673a5f9620539bc3ff2/server-core/src/main/java/io/onedev/server/web/page/project/issues/boards/BoardColumnPanel.java#L436-L472","documentation":"When a card is dropped on a board column, the handler resolves the target field name against the project's issue setting's field spec (custom fields). If getFieldSpec(fieldName) returns null — the field is not a defined custom/issue field — the code throws ExplicitException('Undefined custom field: ' + fieldName) instead of silently writing to an unknown bean property.","triggerScenarios":"Dropping a card on a board column whose column value corresponds to a field name that no longer (or never did) exists in Issue Setting -> Custom Fields, e.g. after the custom field was renamed or removed while the board spec still references it.","commonSituations":"Renaming/deleting a custom field without updating the board's column field; copying a board configuration between projects where field definitions differ; typo in board column field name.","solutions":["Open Project -> Issues -> Board settings and update the column field to an existing custom field.","Recreate or rename the custom field (Issues -> Custom Fields) to match the board column's field name.","Re-check issue form/field specs so board columns, transitions, and custom fields stay in sync after edits."],"exampleFix":"// before (board spec JSON)\n{\"fields\":[{\"name\":\"priority\"},{\"name\":\"deletedField\"}]}\n// after\n{\"fields\":[{\"name\":\"priority\"},{\"name\":\"environment\"}]} // environment defined in Custom Fields","handlingStrategy":"validation","validationCode":"FieldSpec spec = getIssueSetting().getFieldSpec(fieldName);\nif (spec == null) throw new IllegalArgumentException(\"Field not defined in issue settings: \" + fieldName);","typeGuard":null,"tryCatchPattern":"try {\n    // drop card / apply field transition\n} catch (ExplicitException e) {\n    // prompt admin to fix board column -> custom field mapping\n}","preventionTips":["Update board column definitions whenever custom fields are renamed or deleted.","Keep board specs consistent across projects (don't copy board config with project-specific fields).","Audit Issue Setting -> Custom Fields vs board columns after configuration changes."],"tags":["onedev","issues","custom-fields","configuration"],"backgroundTag":"invalid-config-value","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"}