Using the Bulk transition issue statuses endpoint, I’m receiving a 400 response. I’m attempting to move Ticket A to Status X (transition ID “2”), and Ticket B to Status Y (transition ID “3”). Both tickets are in the same Jira space, so I would have thought they’re using the same workflow.
Request body:
{
"bulkTransitionInputs": [
{
"selectedIssueIdsOrKeys": [
"UL-1"
],
"transitionId": "2"
},
{
"selectedIssueIdsOrKeys": [
"UL-2"
],
"transitionId": "3"
}
],
"sendBulkNotification": true
}
Response body:
{
"errors": [
{
"message": "Every transition input must correspond to a distinct workflow."
}
]
}
Hi @JacobPuschmannGuth
The 400 error you’re getting is expected based on how this endpoint works.
The Bulk transition issue statuses endpoint requires that each object in bulkTransitionInputs corresponds to a distinct workflow. If you provide multiple entries that target issues belonging to the same workflow, Jira returns:
“Every transition input must correspond to a distinct workflow.”
Official documentation → https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-bulk-operations/#api-rest-api-3-bulk-issues-transition-post
In your example:
-
UL-1 → transitionId “2”
-
UL-2 → transitionId “3”
If both issues use the same workflow, then you’re sending two bulkTransitionInputs for a single workflow, which is not allowed.
How to handle this
If the issues share the same workflow:
-
You can use this bulk endpoint only when applying the same transition to multiple issues (single bulkTransitionInputs entry with multiple issue keys), or
-
You need to make separate API calls for different transitions.
Just want to add to what @FabienPenchenat said here for more context.
A space (formerly project) is a place you keep work. Each work type (issue type) can have its own distinct workflow. Gives you a way to define different flows for different types of work. That’s why it isn’t always about the space you are in.
To figure out what workflows you are on you would want to figure out what project/issue-types are of the issues and then call something like the Workflow preview api to figure out what workflows are used by the issue-types you are dealing with.