Use this helper method in the Incoming sync to update the source issue once the synchronization to the destination side is finished.
Using the Feature
- 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
On the source side (internal) in the incoming sync processor
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.
A sync conflict is possible whenever changing information on the source issue immediately after an exalate.
|Source Jira||Target Jira|
Status is 'open'
Status is 'Open'
|Change status to 'In Progress|
Status is open
|Syncback is processed|
Status is changed back to 'Open'
|Status is updated to 'In Progress' because of message sent in step 3|
|Status = Open||Status = 'In Progress'|
To avoid this conflict, one can add this code