We are using Exalate to synchronize projects between two JIRA instances (Internal & partners).
We have a project for each partner in JIRA partner, so the project name on internal JIRA is synced as component name in partner JIRA.
So partner A has issue and they component of the issue reflect the project name in internal JIRA.
I have a case now where the partner would create an issue in JIRA partner, and that has to be synchronized to a project in internal Jira based on teh component name of the issue in Partners Jira. how can I do that please ?
Here’s a solution for you, of course you’ll have to change the componentNameToProjectMap values from the component name on the external jiras to the project keys of the internal jira:
if(firstSync){
def componentNameToProjectMap = ["Test component":"TEST","Test component 2":"TEST2"]
issue.projectKey = replica.components.collect { component -> componentNameToProjectMap[component.name] }.find{it != null} ?: "TEST"
// Set type name from source issue, if not found set a default
issue.typeName = nodeHelper.getIssueType(replica.typeName)?.name ?: "Task"
}