In some cases, you need to sync a certain type of issues into the specific project. Depending on the replica issue type or project key you can specify the condition in the script.

Therefore, the Exalate app allows configuring synchronization of the issue type, depending on the project. 

With the help of the synchronization processors, you can define:

  • whether you want to send the project key or issue type from the Source Instance.  
  • what issue type and project are incoming issues created in. 

Use Case example

Imagine you are syncing with your partner. Your partner's instance is sending you some issue data, specified in their Data Filter. E.g. issue type and project key. 

You have certain requirements how these incoming issues should be recorded on your side. Create Processor allows configuring how incoming sync data should be created on your side.

Source side 

Outgoing sync

replica.key            = issue.key
replica.project        = issue.project
replica.type           = issue.type


Destination side 

  • If the issue they sent is of type Bug, create an issue with the type Test in the project Testers. In other cases create an issue with the type Task in the project Developers.

Incoming sync

if(replica.type.name == "Bug") {
  issue.projectKey   = "TESTERS"
  issue.typeName     = "Test" 
}
else{
  issue.projectKey   = "DEVELOPERS"
  issue.typeName     = "Task"
}



  • If the issue they sent is of type Bug from the project SD, create an issue with the type Test in the project Testers. In other cases create an issue with the type Task in the project Developers.

Incoming sync

if(replica.project.key == "SD" && replica.type.name == "Bug") {
  issue.projectKey   = "TESTERS"
  issue.typeName     = "Test" 
}
else{
  issue.projectKey   = "DEVELOPERS"
  issue.typeName     = "Task"
}



  • You can decide, which project to sync the issue, based on the received the issue project key from the source side:
    Incoming sync

if (replica.project?.key == "SERVA") { issue.projectKey = "CLOUDA" }
else if (replica.project?.key == "SERVB") { issue.projectKey = "CLOUDB" }



You can use return in the create processor before any property on issue variable is changed.

For example you can use  if/else with a return  if you don't want to sync issues that don't match the conditions specified above.

// no issue.XXX = YYY before the return below
// ...
if (
	[
		"question", 
		"incident", 
		"changes request", 
		"application upgrades", 
		"os patching"
	].any { it.equalsIgnoreCase(replica.type?.name) }) {
  issue.projectKey = "WHSUP"
} else if ("task".equalsIgnoreCase(replica.type?.name)) {
  issue.projectKey = "WHADM"
} else {
  return
}

See also

How to synchronize issue type

How to keep the issue type when synchronize