{"record":{"id":"b268578e30bbfe80","repo":"theonedev/onedev","slug":"an-active-subscription-is-required-for-this-featur-b26857","errorCode":null,"errorMessage":"An active subscription is required for this feature","messagePattern":"An active subscription is required for this feature","errorType":"http","errorClass":"NotAcceptableException","httpStatus":406,"severity":"error","filePath":"server-core/src/main/java/io/onedev/server/rest/resource/IssueResource.java","lineNumber":322,"sourceCode":"\t\treturn issues;\n\t}\n\n\t@Api(order=1000)\n    @POST\n    public Long createIssue(@NotNull @Valid IssueOpenData data) {\n\t\tvar subject = SecurityUtils.getSubject();\n    \tvar user = SecurityUtils.getUser(subject);\n    \t\n    \tProject project = projectService.load(data.getProjectId());\n    \tif (!SecurityUtils.canAccessProject(project))\n\t\t\tthrow new UnauthorizedException();\n\n\t\tif (data.getIterationIds() != null && !data.getIterationIds().isEmpty() && !SecurityUtils.canScheduleIssues(project))\n\t\t\tthrow new UnauthorizedException(\"No permission to schedule issue. Remove iterationIds if you want to create issue without scheduling it.\");\n\n\t\tif (data.getOwnEstimatedTime() != null) {\n \t\t\tif (!subscriptionService.isSubscriptionActive())\t\t\t\n\t\t\t\tthrow new NotAcceptableException(\"An active subscription is required for this feature\");\n\t\t\tif (!project.isTimeTracking())\n\t\t\t\tthrow new NotAcceptableException(\"Time tracking needs to be enabled for the project\");\n\t\t\tif (!SecurityUtils.canScheduleIssues(project))\n\t\t\t\tthrow new UnauthorizedException(\"Issue schedule permission required to set own estimated time. Remove ownEstimatedTime if you want to create issue without setting own estimated time.\");\n\t\t}\n\n\t\tvar issueSetting = settingService.getIssueSetting();\n\t\t\n\t\tIssue issue = new Issue();\n\t\tissue.setTitle(data.getTitle());\n\t\tissue.setDescription(data.getDescription());\n\t\tissue.setConfidential(data.isConfidential());\n\t\tissue.setProject(project);\n\t\tissue.setSubmitDate(new Date());\n\t\tissue.setSubmitter(user);\n\t\tissue.setState(issueSetting.getInitialStateSpec().getName());\n\t\tif (data.getOwnEstimatedTime() != null)\n\t\t\tissue.setOwnEstimatedTime(data.getOwnEstimatedTime());","sourceCodeStart":304,"sourceCodeEnd":340,"githubUrl":"https://github.com/theonedev/onedev/blob/d44925c47c37992c828ea673a5f9620539bc3ff2/server-core/src/main/java/io/onedev/server/rest/resource/IssueResource.java#L304-L340","documentation":"Setting data.getOwnEstimatedTime() on issue creation is an enterprise feature: createIssue throws NotAcceptableException(\"An active subscription is required for this feature\") when subscriptionService.isSubscriptionActive() is false. Own estimated time is part of OneDev's paid time-tracking capability, so it is rejected on unlicensed (community) installs regardless of permissions.","triggerScenarios":"POST /~api/issues with ownEstimatedTime set on a server without an active enterprise subscription (trial expired, license removed, or community edition).","commonSituations":"Scripts written against a licensed staging instance then run against community production; subscription expired and silently downgraded; feature flag confusion between community and enterprise endpoints.","solutions":["Remove ownEstimatedTime from the request payload.","Purchase/restore an active OneDev enterprise subscription and install the license.","Track estimated time in a custom issue field instead if you are on community edition.","Verify subscription status via the admin console before re-enabling time-tracking automation."],"exampleFix":"// before\nPOST /~api/issues {\"projectId\":1, \"title\":\"x\", \"ownEstimatedTime\":3600}\n// after (no subscription)\nPOST /~api/issues {\"projectId\":1, \"title\":\"x\"}","handlingStrategy":"validation","validationCode":"// only send ownEstimatedTime when the instance is subscribed\nif (!subscriptionActive) {\n    data.setOwnEstimatedTime(null); // feature requires enterprise subscription\n}","typeGuard":null,"tryCatchPattern":"try { client.createIssue(data); }\ncatch (NotAcceptableException e) {\n    if (e.getMessage().contains(\"subscription\")) { data.setOwnEstimatedTime(null); client.createIssue(data); }\n}","preventionTips":["Detect community vs enterprise edition before enabling time-tracking payloads.","Monitor subscription expiry so automation doesn't break after downgrade.","Model ownEstimatedTime as an optional field that is dropped when unsupported."],"tags":["rest-api","issues","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"}