Provides an example of the uni-directional synchronization setup. Setup a synchronization between two projects where issues are flowing from project A on the Left instance to project ACME on the Right instance.
Custom fields on the right instance are kept up to date allowing to search for issues which have been marked as completed.
No information is sent back except for the summary.


Instance LEFTInstance Right
Outgoing sync


// Send over all the details of the project
 
replica.key           = issue.key
replica.assignee      = issue.assignee  
replica.reporter      = issue.reporter
replica.summary       = issue.summary
replica.description   = issue.description
replica.comments      = issue.comments
replica.resolution    = issue.resolution
replica.status        = issue.status
replica.project       = issue.project


// Send the summary and key as partner wants to show the link
 
replica.summary = issue.summary
replica.key = issue.key

Incoming sync


// ignore incoming requests


// Setup the issue - define the project, issuetype and summary
 
issue.project     = nodeHelper.getProject("ACME")
issue.issueType   = nodeHelper.getIssueType("Task")
issue.summary     = replica.summary
issue.description = replica.description
issue.reporter    = nodeHelper.getUser("kspacey")
 
//populate a number of custom fields allowing to do some searches

issue.customFields."Remote Reporter" = nodeHelper.getCustomField("Remote Reporter")
issue.customFields."Remote Reporter".value = replica.reporter.displayName

issue.customFields."Remote Key" = nodeHelper.getCustomField("Remote Key")
issue.customFields."Remote Key".value = replica.key
 

issue.customFields."Remote Status" = nodeHelper.getCustomField("Remote Status")
issue.customFields."Remote Status".value = replica.status.name


 
issue.customFields."Remote Assignee" = nodeHelper.getCustomField("Remote Assignee")
issue.customFields."Remote Assignee".value = replica.assignee.displayName