Skip to content
Latchkey

Jira "transition ... is not valid" (workflow transition id) in CI

Jira accepts a transition only if it exists in the workflow from the issue current status. Passing a transition id that is not offered from the present status, or a name where an id is required, returns a 400.

What this error means

A POST to /issue/KEY/transitions fails with 400 and "Transition id X is not valid for the current status of the issue," even though the transition exists elsewhere in the workflow.

Jira REST
HTTP/1.1 400 Bad Request
{"errorMessages":["It is not possible to change the status of this issue to the requested status."],
 "errors":{}}

Common causes

The transition is not available from the current status

Workflows expose different transitions per status. A transition valid from "To Do" may not exist from "In Progress," so its id is rejected.

A transition name was sent instead of its id

The transitions API keys on numeric ids, and ids differ per workflow. Hardcoding a name or the wrong number fails.

How to fix it

Look up the valid transitions for this issue first

  1. GET the available transitions for the specific issue and status.
  2. Read the numeric id whose to.name is your target status.
  3. POST that id, which is guaranteed valid from the current status.
Terminal
curl -sf -u "$JIRA_EMAIL:$JIRA_API_TOKEN" \
  "https://your-domain.atlassian.net/rest/api/3/issue/ABC-123/transitions"

Post the resolved transition id

Use the id discovered above rather than a hardcoded number, since ids vary across workflows and projects.

Terminal
curl -sf -u "$JIRA_EMAIL:$JIRA_API_TOKEN" -X POST \
  -H "Content-Type: application/json" \
  -d '{"transition":{"id":"31"}}' \
  "https://your-domain.atlassian.net/rest/api/3/issue/ABC-123/transitions"

How to prevent it

  • Resolve transition ids at runtime from the issue current status.
  • Never hardcode transition ids across projects or workflows.
  • Map target status names to ids dynamically per issue.

Frequently asked questions

What causes "Jira "transition is not valid""?
Workflows expose different transitions per status. A transition valid from "To Do" may not exist from "In Progress," so its id is rejected.
How do I fix Jira "transition is not valid"?
Look up the valid transitions for this issue first

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card