Confluence has been updated to version 6.15.9

Back to  syncHelper


JIRA ON-PREMISE JIRA CLOUD HP ALM/QC SERVICENOW ZENDESK GITHUB AZURE DEVOPS SALESFORCE

Signature

HelpersyncHelper
Signature
syncBackAfterProcessing()
Description

Use this helper method in the Incoming sync to update the source issue once the synchronization to the destination side is finished.

Introduced in4.6.5

Using the feature

Assume

  • you have 2 instances 'Internal' and 'External'. 
  • You raise an issue on 'Internal', and exalate it to 'External'
  • You need to have a custom field on Internal containing the remote key of the issue created on External


What needs to happen is

  • Once that the issue is created on External, a message is sent back to Internal containing the key of the created issue
  • The syncHelper.syncBackAfterProcessing() will trigger this message as it will queue a sync event which is handled as if the issue on external has been changed
  • The processing of this sync event is identical to any other sync event



What you need to configure


On the destination side (external) in the incoming sync processor

// trigger a sync back to the internal instance
if(firstSync){
  syncHelper.syncBackAfterProcessing()
} 

On the source side (internal) in the incoming sync processor

// update the custom field 'remote issue key'  with the  key of the newly created issue
issue.customFields."remote issue key".value = replica.key


(warning) Method syncHelper.syncBackAfterProcessing() will only work for the bidirectional synchronization. Using it for the unidirectional sync might lead to unexpected sync errors.

Using syncHelper.syncBackAfterProcessing() outside the firstSync if block might cause infinite loops.


Back to  syncHelper