theonedev/onedev · error · ExplicitException

An active subscription is required for this feature

Error message

An active subscription is required for this feature

What it means

Setting 'ownEstimatedTime' on a newly created issue is a paid feature. IssueHelper.createIssue checks SubscriptionService.isSubscriptionActive() before applying it and throws this ExplicitException when no active subscription exists.

Source

Thrown at server-core/src/main/java/io/onedev/server/ai/IssueHelper.java:287

        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);
        }

        List<String> iterationNames = (List<String>) data.remove("iterations");
        if (iterationNames != null) {
            if (!SecurityUtils.canScheduleIssues(subject, project))
                throw new UnauthorizedException("Issue schedule permission required to set iterations");
            var iterationService = OneDev.getInstance(IterationService.class);
            for (var iterationName : iterationNames) {
                var iteration = iterationService.findInHierarchy(project, iterationName);
                if (iteration == null)
                    throw new ExplicitException("Iteration '" + iterationName + "' not found");
                IssueSchedule schedule = new IssueSchedule();
                schedule.setIssue(issue);

View on GitHub (pinned to d44925c47c)

Solutions

  1. Obtain/activate a OneDev subscription (Settings > Subscription) or renew the expired one
  2. Remove the "ownEstimatedTime" field from the request if time tracking is not needed
  3. Downscope the AI tool/tool arguments so estimated time is not sent on unlicensed instances

Example fix

// before
data.put("ownEstimatedTime", 8);
// after (community edition): drop the field
data.remove("ownEstimatedTime");
Defensive patterns

Strategy: validation

Validate before calling

boolean canSet = OneDev.getInstance(SubscriptionService.class).isSubscriptionActive();
if (!canSet) data.remove("ownEstimatedTime");

Try / catch

try {
    issueHelper.createIssue(project, subject, data);
} catch (ExplicitException e) {
    if ("An active subscription is required for this feature".equals(e.getMessage())) {
        data.remove("ownEstimatedTime");
        issueHelper.createIssue(project, subject, data); // retry without paid feature
    }
}

Prevention

When it happens

Trigger: Passing a non-null "ownEstimatedTime" entry in the data map to createIssue while the OneDev instance has no active subscription.

Common situations: Community/unpaid edition used with time-tracking automation; subscription expired; AI tool call including estimated time on an unlicensed instance.

Related errors


AI-assisted analysis of theonedev/onedev@d44925c47c (2026-09-06). Data as JSON: /api/errors/4aab8f91ff0073e7. Report an issue: GitHub.