theonedev/onedev · error · NotAcceptableException
Issue management not enabled in this project
Error message
Issue management not enabled in this project
What it means
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.
Source
Thrown at server-core/src/main/java/io/onedev/server/web/page/project/issues/create/NewIssuePage.java:50
import io.onedev.server.web.component.issue.workflowreconcile.WorkflowChangeAlertPanel;
import io.onedev.server.web.component.link.ViewStateAwarePageLink;
import io.onedev.server.web.page.project.ProjectPage;
import io.onedev.server.web.page.project.issues.detail.IssueActivitiesPage;
import io.onedev.server.web.page.project.issues.list.ProjectIssueListPage;
import io.onedev.server.web.page.project.overview.ProjectOverviewPage;
import io.onedev.server.web.page.security.LoginPage;
public class NewIssuePage extends ProjectPage implements InputContext {
private static final String PARAM_TEMPLATE = "template";
private IModel<Criteria<Issue>> templateModel;
public NewIssuePage(PageParameters params) {
super(params);
if (!getProject().isIssueManagement())
throw new NotAcceptableException(_T("Issue management not enabled in this project"));
User currentUser = getLoginUser();
if (currentUser == null)
throw new RestartResponseAtInterceptPageException(LoginPage.class);
String queryString = params.get(PARAM_TEMPLATE).toString();
templateModel = new LoadableDetachableModel<Criteria<Issue>>() {
@Override
protected Criteria<Issue> load() {
try {
IssueQueryParseOption option = new IssueQueryParseOption().withCurrentUserCriteria(true);
return IssueQuery.parse(getProject(), queryString, option, true).getCriteria();
} catch (Exception e) {
return null;
}
}
View on GitHub (pinned to d44925c47c)
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.
Example fix
// before
response.sendRedirect(basePath + "/~issues/new?project=" + projectPath);
// after
if (project.isIssueManagement())
response.sendRedirect(basePath + "/~issues/new?project=" + projectPath);
else
throw new IllegalStateException("Project " + projectPath + " has issue management disabled"); Defensive patterns
Strategy: validation
Validate before calling
if (!project.isIssueManagement()) { throw new IllegalStateException("Issue management is disabled for project " + project.getPath()); } Type guard
boolean canCreateIssue(Project p) { return p != null && p.isIssueManagement(); } Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Invalid issue number: {0}
- Unable to find issue #{0} in project {1}
- Package management not enabled for project '${project.getPat
- Title is required
- Time tracking needs to be enabled for the project
AI-assisted analysis of theonedev/onedev@d44925c47c (2026-09-06).
Data as JSON: /api/errors/dbcb1b23c413931f.
Report an issue: GitHub.