theonedev/onedev · error · NotAcceptableException

No applicable manual transition spec found for current user

Error message

No applicable manual transition spec found for current user (issue: ${issue.getReference().toString()}, from state: ${issue.getState()}, to state: ${state})

What it means

Thrown as NotAcceptableException when getManualSpec returns null: there is no manual transition spec in the project's issue workflow that permits this user to move the issue from its current state to the requested state. The message includes the issue reference, current state, and requested state.

Source

Thrown at server-core/src/main/java/io/onedev/server/ai/TodResource.java:681

        var subject = SecurityUtils.getSubject();
        var user = SecurityUtils.getUser(subject);
        if (user == null)
            throw new UnauthenticatedException();

        var currentProject = getProject(currentProjectPath);

        var issue = getIssue(currentProject, issueReference);
        IssueHelper.normalizeData(data);
        var state = (String) data.remove("state");
        if (state == null)
            throw new NotAcceptableException("State is required");
        var comment = (String) data.remove("comment");
        ManualSpec transition = issue.getProject().getManualSpec(subject, issue, state);
        if (transition == null) {
            var message = MessageFormat.format(
                "No applicable manual transition spec found for current user (issue: {0}, from state: {1}, to state: {2})",
                issue.getReference().toString(), issue.getState(), state);
            throw new NotAcceptableException(message);
        }

        var fieldValues = FieldUtils.getFieldValues(subject, issue.getProject(), data);
        issueChangeService.changeState(user, issue, state, fieldValues, transition.getPromptFields(),
                transition.getRemoveFields(), comment);
        return IssueHelper.getDetail(currentProject, issue);
    }

    @Path("/ensure-issue-branch") 
    @POST
    public String ensureIssueBranch(
                @QueryParam("currentProject") @NotNull String currentProjectPath, 
                @QueryParam("reference") @NotNull String issueReference) {
        var subject = SecurityUtils.getSubject();

        var currentProject = getProject(currentProjectPath);
        var issue = getIssue(currentProject, issueReference);

View on GitHub (pinned to d44925c47c)

Solutions

  1. Define or enable a manual transition spec from the issue's current state to the requested state in the project's issue workflow settings.
  2. Grant the user the permission/role required by the existing transition spec.
  3. Choose a different target state that has an applicable manual transition for this user.

Example fix

// before
transition request to state "Released" // no manual transition defined from "In Progress"
// after: add a manual transition spec In Progress -> Released (with proper authorization),
// or request an existing applicable state like "Done"
Defensive patterns

Strategy: validation

Validate before calling

// pre-check that a manual transition exists for this user and target state
const spec = project.manualSpecs.find(s =>
  s.fromState === issue.state && s.toState === state && userMeetsAuth(s.authorization));
if (!spec) throw new Error(`No manual transition ${issue.state} -> ${state} for this user`);

Type guard

function canTransition(project, issue, user, toState) {
  return project.manualSpecs.some(s => s.fromState === issue.state && s.toState === toState
    && s.authorizedGroups.some(g => user.groups.includes(g)));
}

Try / catch

try {
  await transitionIssue(...);
} catch (e) {
  if (e.status === 406 || /No applicable manual transition spec/.test(e.message)) {
    // list applicable transitions for the user and pick one
  } else throw e;
}

Prevention

When it happens

Trigger: Requesting a state the workflow has no manual transition to; the transition exists but its authorization (required permission/role/group) excludes the current user; transition only defined from a different source state.

Common situations: Requesting a state name that exists on the board but has no incoming manual transition; user lacks the role required by the transition's authorization; workflow config changed so the old path no longer applies.

Understand the failure class

Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.

Related errors


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