Warning: Despite our best efforts, code can change without notice due to a variety of factors. If you encounter an issue in any of the code shown here and find that a specific block of code is not correct, or is causing errors, please check with the Community to find an updated version.
This article shows how to set a project in local sync based on the source issue project picker custom field value. You can set the issue project based on the custom field value from the source issue. This works for local synchronization only.
Below you can find an example configuration on how to set the target issue project, based on the source issue custom field value.
Source side
Outgoing sync
def jProject = issue.customFields."Source Project Picker".value replica.customFields."Project picker CF name" = jProject ? nodeHelper.getProject(jProject.key) : null
Destination side
Incoming sync
def exaProject = replica.customKeys."Project picker CF name" issue.projectKey = exaProject?.key