Incorrect Resolution Synced Despite Different Transitions

I’m syncing issues between two Jira Cloud instances using Exalate. Both instances use the same workflow with these statuses: To Do, In Progress, and Done.

From the In Progress status, I’ve added two transitions that lead to Done:

  • Resolved with Workaround – this sets the Resolution to Won’t Do using a post function.
  • Resolved with Release – this sets the Resolution to Done using a post function.

Both Jira Cloud instances have the exact same workflow and transitions.

The problem is: when I transition an issue using Resolved with Workaround on the source side, it still shows the Resolution as Done on the destination side, even though the Resolution is correctly set to Won’t Do on the source.

So no matter which transition I use, the Resolution always ends up as Done after synchronization.

Hi,

My understanding of the problem statement is that you would like to choose a transition on local system based on status and resolution information arriving from the remote end. I tested this and here are the scripts I used:

Outgoing: The only line I added to default scripts was:

replica.resolution = issue.resolution

Incoming:

if (!firstSync && replica.status.name == "Done" && previous.status.name != "Done") {
    if (replica.resolution?.name == "Won't Do") {
        workflowHelper.transition(issue, "Resolved with Workaround")
    } else if (replica.resolution?.name == "Done") {
        workflowHelper.transition(issue, "Resolved with Release")
    }
}
else
    issue.status = replica.status 

Here is a short video demo:

Please let me know if you have any questions.

Thanks
Majid