{"record":{"id":"4aab8f91ff0073e7","repo":"theonedev/onedev","slug":"an-active-subscription-is-required-for-this-featur","errorCode":null,"errorMessage":"An active subscription is required for this feature","messagePattern":"An active subscription is required for this feature","errorType":"exception","errorClass":"ExplicitException","httpStatus":null,"severity":"error","filePath":"server-core/src/main/java/io/onedev/server/ai/IssueHelper.java","lineNumber":287,"sourceCode":"\n        var issueSetting = OneDev.getInstance(SettingService.class).getIssueSetting();\n\n        Issue issue = new Issue();\n        var title = (String) data.remove(\"title\");\n        if (title == null)\n            throw new ExplicitException(\"Title is required\");\n        issue.setTitle(title);\n        var description = (String) data.remove(\"description\");\n        issue.setDescription(description);\n        var confidential = (Boolean) data.remove(\"confidential\");\n        if (confidential != null)\n            issue.setConfidential(confidential);\n\n        Integer ownEstimatedTime = (Integer) data.remove(\"ownEstimatedTime\");\n        if (ownEstimatedTime != null) {\n            var subscriptionService = OneDev.getInstance(SubscriptionService.class);\n            if (!subscriptionService.isSubscriptionActive())\n                throw new ExplicitException(\"An active subscription is required for this feature\");\n            if (!project.isTimeTracking())\n                throw new ExplicitException(\"Time tracking needs to be enabled for the project\");\n            if (!SecurityUtils.canScheduleIssues(subject, project))\n                throw new UnauthorizedException(\"Issue schedule permission required to set own estimated time\");\n            issue.setOwnEstimatedTime(ownEstimatedTime * 60);\n        }\n\n        List<String> iterationNames = (List<String>) data.remove(\"iterations\");\n        if (iterationNames != null) {\n            if (!SecurityUtils.canScheduleIssues(subject, project))\n                throw new UnauthorizedException(\"Issue schedule permission required to set iterations\");\n            var iterationService = OneDev.getInstance(IterationService.class);\n            for (var iterationName : iterationNames) {\n                var iteration = iterationService.findInHierarchy(project, iterationName);\n                if (iteration == null)\n                    throw new ExplicitException(\"Iteration '\" + iterationName + \"' not found\");\n                IssueSchedule schedule = new IssueSchedule();\n                schedule.setIssue(issue);","sourceCodeStart":269,"sourceCodeEnd":305,"githubUrl":"https://github.com/theonedev/onedev/blob/d44925c47c37992c828ea673a5f9620539bc3ff2/server-core/src/main/java/io/onedev/server/ai/IssueHelper.java#L269-L305","documentation":"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.","triggerScenarios":"Passing a non-null \"ownEstimatedTime\" entry in the data map to createIssue while the OneDev instance has no active subscription.","commonSituations":"Community/unpaid edition used with time-tracking automation; subscription expired; AI tool call including estimated time on an unlicensed instance.","solutions":["Obtain/activate a OneDev subscription (Settings > Subscription) or renew the expired one","Remove the \"ownEstimatedTime\" field from the request if time tracking is not needed","Downscope the AI tool/tool arguments so estimated time is not sent on unlicensed instances"],"exampleFix":"// before\ndata.put(\"ownEstimatedTime\", 8);\n// after (community edition): drop the field\ndata.remove(\"ownEstimatedTime\");","handlingStrategy":"validation","validationCode":"boolean canSet = OneDev.getInstance(SubscriptionService.class).isSubscriptionActive();\nif (!canSet) data.remove(\"ownEstimatedTime\");","typeGuard":null,"tryCatchPattern":"try {\n    issueHelper.createIssue(project, subject, data);\n} catch (ExplicitException e) {\n    if (\"An active subscription is required for this feature\".equals(e.getMessage())) {\n        data.remove(\"ownEstimatedTime\");\n        issueHelper.createIssue(project, subject, data); // retry without paid feature\n    }\n}","preventionTips":["Gate paid fields (ownEstimatedTime) behind a subscription check","Keep the OneDev subscription active/renewed","Strip paid fields from automation payloads on community instances"],"tags":["licensing","subscription","time-tracking"],"backgroundTag":"feature-not-enabled","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"}