This question is pertaining to https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-transitions-post
I am having a problem with the POST request to transition an issue to another swimlane, it does not always work - sometimes it passes (204) and at other times, it fails (400 bad request).
My code is as such:
const config = {
headers: {
Authorization: `Basic ${token}`,
Accept: 'application/json'
}
};
const payload = {
transition: {
id: transitionId
}
};
let path = 'rest/api/3/issue/:issueNo/transitions';
path = path.replace(':issueNo', issueNo);
const url = domain + path;
axios.post(url, payload, config);
Welcome to the Community!
A clarification here - unless you have based your swimlanes on status (which is not something people do because it is not particularly useful), you do not use transitions to change the swimlane an issue is in.
I suspect you mean you are trying to move between columns. Columns on a board are a collection of one or more status, and to change status of an issue, you need to use transitions.
If Jira is failing a transition for some reason, it should be replying to your post with a reason why - it could be that there is a condition blocking the transition, it is failing validation, or an internal error is occurring during the transition. It should also tell you if a transition is not valid for the issue - this can give you a 400 error sometimes instead, depending on the reason, but the main ones would be a condition saying "no", or that you are trying to call a transition that is not valid for the current status of the issue.
I would want to check your workflow for all the reasons that might be blocking your transition (including there not actually being a transition there at all!)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.