Explanation
Variables
When you start an issue synchronization, Exalate creates a replica. It's a copy of an issue which holds information that will be sent to the Destination side.
In the outgoing sync
- replica variable defines the information added to the issue copy
- issue variable refers to the original issue
In the incoming sync
- issue variable refers to the issue where the change needs to be applied.
- replica variable refers to the issue where the change happened.
Example
To send issue summary field define replica.summary variable as below
replica.summary = issue.summary
issue.summary = replica.summary
Another example is more complex and shows how you can use conditions to apply incoming data in different ways.
Sync Rules below are for the incoming sync in the local connection and have if blocks to handle everything in one create processor.
//If the project key is TEST, create issue in DEV project if(replica.project.key == "TEST"){ issue.projectKey = "DEV" issue.typeName = nodeHelper.getIssueType(replica.type?.name, issue.projectKey)?.name ?: "Task" } //If the project key is DEV, create issue in TEST project if(replica.project.key == "DEV"){ issue.projectKey = "TEST" issue.typeName = nodeHelper.getIssueType(replica.type?.name, issue.projectKey)?.name ?: "Task" }
Check the local synchronization use case for more details.