theonedev/onedev · error · ExplicitException
Title is required
Error message
Title is required
What it means
IssueHelper.createIssue builds an Issue from a data map (typically supplied by an AI tool call). The 'title' key is mandatory; if absent (null after removal from the map), the method throws this ExplicitException before creating the issue.
Source
Thrown at server-core/src/main/java/io/onedev/server/ai/IssueHelper.java:275
for (var field : OneDev.getInstance(SettingService.class).getIssueSetting().getFieldSpecs()) {
var paramName = getParamName(field.getName());
if (!paramName.equals(field.getName()) && data.containsKey(paramName)) {
data.put(field.getName(), data.get(paramName));
data.remove(paramName);
}
}
}
@SuppressWarnings("unchecked")
public static Issue createIssue(Subject subject, Project project, Map<String, Serializable> data) {
normalizeData(data);
var issueSetting = OneDev.getInstance(SettingService.class).getIssueSetting();
Issue issue = new Issue();
var title = (String) data.remove("title");
if (title == null)
throw new ExplicitException("Title is required");
issue.setTitle(title);
var description = (String) data.remove("description");
issue.setDescription(description);
var confidential = (Boolean) data.remove("confidential");
if (confidential != null)
issue.setConfidential(confidential);
Integer ownEstimatedTime = (Integer) data.remove("ownEstimatedTime");
if (ownEstimatedTime != null) {
var subscriptionService = OneDev.getInstance(SubscriptionService.class);
if (!subscriptionService.isSubscriptionActive())
throw new ExplicitException("An active subscription is required for this feature");
if (!project.isTimeTracking())
throw new ExplicitException("Time tracking needs to be enabled for the project");
if (!SecurityUtils.canScheduleIssues(subject, project))
throw new UnauthorizedException("Issue schedule permission required to set own estimated time");
issue.setOwnEstimatedTime(ownEstimatedTime * 60);
}View on GitHub (pinned to d44925c47c)
Solutions
- Include a non-null "title" key in the data passed to createIssue
- If driven by an AI tool call, check the arguments the model produced and correct the tool schema/prompt so title is always provided
- Validate the payload before invoking the helper
Example fix
// before
Map<String, Object> data = Map.of("description", "bug details");
issueHelper.createIssue(project, user, data);
// after
Map<String, Object> data = new HashMap<>();
data.put("title", "Fix login NPE");
data.put("description", "bug details");
issueHelper.createIssue(project, user, data); Defensive patterns
Strategy: validation
Validate before calling
// before calling createIssue
if (data.get("title") == null || data.get("title").toString().isBlank())
throw new IllegalArgumentException("title is required"); Try / catch
try {
issueHelper.createIssue(project, subject, data);
} catch (ExplicitException e) {
if ("Title is required".equals(e.getMessage())) {
// prompt user / model for a title and retry
}
} Prevention
- Always include a title in issue-creation payloads
- Make title a required field in any AI tool schema for issue creation
- Validate payloads before invoking the helper
When it happens
Trigger: Calling createIssue (directly or via the AI issue-creation tool) with a data map that has no "title" entry.
Common situations: AI model generating issue-creation arguments without a title field; API/automation scripts omitting the title; JSON payload key misspelled or empty string normalized away upstream.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- Issue ${issueReference} is not in current project
- Invalid issue id/number
- Not eligible for multi-value
- Subject required to open issue via email
- This address is intended to open issues, however the message
AI-assisted analysis of theonedev/onedev@d44925c47c (2026-09-06).
Data as JSON: /api/errors/95b86aca4ee19ed6.
Report an issue: GitHub.