theonedev/onedev · error · ExplicitException
Undefined custom field:
Error message
Undefined custom field:
What it means
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.
Source
Thrown at server-core/src/main/java/io/onedev/server/web/page/project/issues/boards/BoardColumnPanel.java:454
@Override
protected String getToState() {
return getColumn();
}
};
}
};
} else {
getIssueChangeService().changeState(user, issue, getColumn(),
new HashMap<>(), transitionRef.get().getPromptFields(),
transitionRef.get().getRemoveFields(), null);
cardListPanel.onCardDropped(target, issueId, cardIndex, true);
}
} else {
FieldSpec fieldSpec = getIssueSetting().getFieldSpec(fieldName);
if (fieldSpec == null)
throw new ExplicitException(_T("Undefined custom field: ") + fieldName);
Serializable fieldBean = issue.getFieldBean(FieldUtils.getFieldBeanClass(true));
BeanDescriptor beanDescriptor = new BeanDescriptor(fieldBean.getClass());
beanDescriptor.getProperty(fieldName).setPropertyValue(fieldBean, getColumn());
Collection<String> dependentFields = fieldSpec.getTransitiveDependents();
boolean hasVisibleEditableDependents = dependentFields.stream()
.anyMatch(it -> SecurityUtils.canEditIssueField(issue.getProject(), it)
&& FieldUtils.isFieldVisible(issue.getProject(), beanDescriptor, fieldBean, it));
Map<String, Object> fieldValues = new HashMap<>();
fieldValues.put(fieldName, getColumn());
if (hasVisibleEditableDependents) {
Collection<String> propertyNames = FieldUtils.getEditablePropertyNames(
issue.getProject(), fieldBean.getClass(), dependentFields);
class DependentFieldsEditor extends BeanEditModalPanel<Serializable>
implements ProjectAware, InputContext {View on GitHub (pinned to d44925c47c)
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.
Example fix
// before (board spec JSON)
{"fields":[{"name":"priority"},{"name":"deletedField"}]}
// after
{"fields":[{"name":"priority"},{"name":"environment"}]} // environment defined in Custom Fields Defensive patterns
Strategy: validation
Validate before calling
FieldSpec spec = getIssueSetting().getFieldSpec(fieldName);
if (spec == null) throw new IllegalArgumentException("Field not defined in issue settings: " + fieldName); Try / catch
try {
// drop card / apply field transition
} catch (ExplicitException e) {
// prompt admin to fix board column -> custom field mapping
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- No any issue state is defined
- Issue schedule permission required to set iterations
- Iteration '${iterationName}' not found
- Issue ${issueReference} is not in current project
- Link spec not found: ${linkName}
AI-assisted analysis of theonedev/onedev@d44925c47c (2026-09-06).
Data as JSON: /api/errors/d7651b42cb8d2d11.
Report an issue: GitHub.