We are working on Jira DC / on premise (Powered by Exalate v. 5.28.1 (Core v.5.13.5)) and encountered a blocker while trying to implement some logic in the code.
While trying to work on a specific scenario requested by a client, we wanted to go back to the status IN PROGRESS. However, this status can only be transitioned to from TO DO. In our case, the client is trying to force all statuses can go to TO DO so we tried adding in the code two transitions (reset to TO DO then set it to IN PROGRESS) but it doesn’t seem to work.
What we are trying to do:
if (targetStatus) {
// Handle workflow transitions - use TO DO as gateway if needed
def currentStatus = issue.status.name
if (targetStatus == "IN PROGRESS" && currentStatus != "TO DO") {
// First transition to TO DO, then to IN PROGRESS
issue.setStatus("TO DO")
issue.setStatus("IN PROGRESS")
} else {
// Direct transition is possible for other statuses
issue.setStatus(targetStatus)
}
}
Using Aida and documentation, I found that you cannot reliably call issue.setStatus() multiple times in a single sync event to perform sequential transitions. Only one status transition will be processed per sync event, and calling setStatus twice will not result in two transitions.
SearchDocumentationTool(query=“multiple status transitions in one sync Jira DC setStatus”)
Based on the documentation, Exalate for Jira DC/on-premise only processes a single status transition per sync event. When you call issue.setStatus() multiple times in the same sync, only the last call is actually executed—sequential transitions (like TO DO → IN PROGRESS) within a single sync are not supported. This is a technical limitation of how Exalate processes status changes during synchronization.
The workaround using storeIssue() is not available on Jira DC/on-premise, as you mentioned. The alternative approach described in the documentation—using triggers or custom fields to drive transitions—also doesn’t allow chaining two transitions in one sync event.
So, unless you can modify the workflow to allow direct transitions from all statuses to IN PROGRESS, there isn’t a way to perform two sequential status transitions in a single sync via code on Jira DC/on-premise. You would need to either:
Adjust the workflow to allow direct transitions to IN PROGRESS from any status, or
Accept that the transition will require two sync cycles: first to TO DO, then (on the next sync) to IN PROGRESS.
You can find more details in the documentation here:
So every time if it has to go back it will first go to done to then move to the needed one.
of course this is not the most optimal but I hope the idea is there
BR