{"record":{"id":"dbcb1b23c413931f","repo":"theonedev/onedev","slug":"issue-management-not-enabled-in-this-project","errorCode":null,"errorMessage":"Issue management not enabled in this project","messagePattern":"Issue management not enabled in this project","errorType":"exception","errorClass":"NotAcceptableException","httpStatus":null,"severity":"error","filePath":"server-core/src/main/java/io/onedev/server/web/page/project/issues/create/NewIssuePage.java","lineNumber":50,"sourceCode":"import io.onedev.server.web.component.issue.workflowreconcile.WorkflowChangeAlertPanel;\nimport io.onedev.server.web.component.link.ViewStateAwarePageLink;\nimport io.onedev.server.web.page.project.ProjectPage;\nimport io.onedev.server.web.page.project.issues.detail.IssueActivitiesPage;\nimport io.onedev.server.web.page.project.issues.list.ProjectIssueListPage;\nimport io.onedev.server.web.page.project.overview.ProjectOverviewPage;\nimport io.onedev.server.web.page.security.LoginPage;\n\npublic class NewIssuePage extends ProjectPage implements InputContext {\n\n\tprivate static final String PARAM_TEMPLATE = \"template\";\n\t\n\tprivate IModel<Criteria<Issue>> templateModel;\n\t\n\tpublic NewIssuePage(PageParameters params) {\n\t\tsuper(params);\n\t\t\n\t\tif (!getProject().isIssueManagement())\n\t\t\tthrow new NotAcceptableException(_T(\"Issue management not enabled in this project\"));\n\t\t\n\t\tUser currentUser = getLoginUser();\n\t\tif (currentUser == null)\n\t\t\tthrow new RestartResponseAtInterceptPageException(LoginPage.class);\n\t\t\n\t\tString queryString = params.get(PARAM_TEMPLATE).toString();\n\t\ttemplateModel = new LoadableDetachableModel<Criteria<Issue>>() {\n\n\t\t\t@Override\n\t\t\tprotected Criteria<Issue> load() {\n\t\t\t\ttry {\n\t\t\t\t\tIssueQueryParseOption option = new IssueQueryParseOption().withCurrentUserCriteria(true);\n\t\t\t\t\treturn IssueQuery.parse(getProject(), queryString, option, true).getCriteria();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\t","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/theonedev/onedev/blob/d44925c47c37992c828ea673a5f9620539bc3ff2/server-core/src/main/java/io/onedev/server/web/page/project/issues/create/NewIssuePage.java#L32-L68","documentation":"OneDev throws this when a user navigates to the NewIssuePage of a project that has issue management turned off. The page constructor checks getProject().isIssueManagement() before rendering and rejects access with a NotAcceptableException. It is an access/feature-gating guard, not a bug.","triggerScenarios":"Directly opening the new-issue URL (or following a bookmark/deep link to create an issue) in a project whose Issue Management setting is disabled; rendering an issue-creation link for a project where issues were later turned off.","commonSituations":"An admin disabled issue tracking for the project after users bookmarked issue URLs; a tool or script auto-generates issue-creation links for all projects regardless of settings; user pasted a link from another project into this one.","solutions":["Enable issue management in the project: Project -> Settings (or project sidebar) -> Issue Management -> turn it on.","Navigate to the correct project that actually has issue management enabled.","If embedding links programmatically, check project.isIssueManagement() before linking to the NewIssuePage."],"exampleFix":"// before\nresponse.sendRedirect(basePath + \"/~issues/new?project=\" + projectPath);\n// after\nif (project.isIssueManagement())\n    response.sendRedirect(basePath + \"/~issues/new?project=\" + projectPath);\nelse\n    throw new IllegalStateException(\"Project \" + projectPath + \" has issue management disabled\");","handlingStrategy":"validation","validationCode":"if (!project.isIssueManagement()) { throw new IllegalStateException(\"Issue management is disabled for project \" + project.getPath()); }","typeGuard":"boolean canCreateIssue(Project p) { return p != null && p.isIssueManagement(); }","tryCatchPattern":null,"preventionTips":["Check project.isIssueManagement() before linking to NewIssuePage.","Keep project feature settings documented so users know where issues are tracked.","Avoid blanket URL templates that assume every project has issues enabled."],"tags":["wicket","issues","feature-flag","http-406"],"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-14T05:17:10.506Z"}