theonedev/onedev · error · ValidationException
Not eligible for multi-value
Error message
Not eligible for multi-value
What it means
IssueChoiceInput accepts only one value per submission: the strings.size()==1 branch parses a single id, and any collection larger than one hits the else branch throwing ValidationException('Not eligible for multi-value').
Source
Thrown at server-core/src/main/java/io/onedev/server/buildspecmodel/inputspec/IssueChoiceInput.java:37
buffer.append(" @NotNull\n");
buffer.append(" @IssueChoice(useNumber=true)\n");
inputSpec.appendMethods(buffer, index, "Long", null, null);
return buffer.toString();
}
public static Object convertToObject(List<String> strings) {
if (strings.size() == 0) {
return null;
} else if (strings.size() == 1) {
String value = strings.iterator().next();
try {
return Long.valueOf(value);
} catch (NumberFormatException e) {
throw new ValidationException("Invalid issue id/number");
}
} else {
throw new ValidationException("Not eligible for multi-value");
}
}
public static List<String> convertToStrings(Object value) {
if (value instanceof Long)
return Lists.newArrayList(value.toString());
else
return new ArrayList<>();
}
}
View on GitHub (pinned to d44925c47c)
Solutions
- Pass exactly one issue id for this input.
- Remove multiple selection in the form before submitting.
- If several issues are needed, create separate issue-choice inputs.
- Fix the script to submit a scalar value rather than an array.
Example fix
// before values: ["12", "34"] // after value: "12"
Defensive patterns
Strategy: validation
Validate before calling
// Ensure single value before converting
if (values != null && values.size() > 1) {
throw new Error("Issue choice input accepts exactly one value");
} Try / catch
try {
Object issue = IssueChoiceInput.convertToObject(strings);
} catch (ValidationException e) {
if (e.getMessage().contains("multi-value")) {
// take first element or ask user to select one
}
} Prevention
- Keep issue choice inputs single-select.
- Fix scripts that submit arrays of issue ids.
- Separate inputs per issue when multiple are needed.
When it happens
Trigger: convertToObject called with more than one string for an issue-choice input, e.g. multiple values selected in the form or a list passed programmatically.
Common situations: Submitting a multi-value list from an automation script; input mistakenly configured/rendered as multi-select; reusing a multi-value parameter definition for an issue choice input.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- Not eligible for multi-value
- Invalid issue id/number
- Not eligible for multi-value
- Title is required
- Issue ${issueReference} is not in current project
AI-assisted analysis of theonedev/onedev@d44925c47c (2026-09-06).
Data as JSON: /api/errors/08f8d01b9daa554b.
Report an issue: GitHub.