This article provides details about the local synchronization and its configuration.

Local connection allows to sync between projects within one instance. You don't need to send an invitation to complete connection configuration in this case.

When configuring local connection you can select the Single project to project synchronization template. It allows to exchange basic project information such as summary, description, labels, comments and attachments between two local projects. This is a simple way to set up basic local sync, where you select the projects you want to synchronize.

There's only one set of Sync Rules for both projects. Meaning that both Source and Destination projects share the same outgoing and incoming sync rules. 

Every time a synced issue gets updated independently of the project, Exalate executes synchronization processors:

  • Outgoing sync(data filter) where issue variables represent the local issue that was updated
  • Incoming sync(create and change processors) where replica variables represent the received issue data; issue variables represent the local issue

To deal with this we add conditions to know from which project sync is coming or which is the local issue project.

It means that you will need to use groovy conditional structure to specify different rules for every sync side.

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(data filter) 

  • replica variable defines the information added to the issue copy
  • issue variable refers to the original issue 

In the incoming sync(create and change processor) 

  • 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
To apply received summary to the local issue, add the following sync rule into the incoming sync(create/change processor)
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.