Page History
...
Snippet |
---|
if (firstSync && replica.project.key != "HELP") { return } else if (!firstSync && replica.project.key != "HELP") { // don't apply any changes if the remote issue has been moved from the HELP project return } // the rest of the script remains untouched and goes after this `if` |
Stop the sync if the issue has been moved to another project
Use this approach if moved issues would not be moved back at some point of time.
If the issue is moved back, it triggers sync once again by creating new twin issue.
Source side
Incoming sync
Snippet |
---|
if (!firstSync && issue.project.key != "HELP") { // stop sync if the local issue has been moved from the HELP project final def _syncInitService = com.atlassian.jira.component.ComponentAccessor .getOSGiComponentInstanceOfType(com.exalate.api.trigger.ISyncInitiationService.class) _syncInitService.unexalate(issueKey.id as String) return } // the rest of the script remains untouched and goes after this `if` |
Destination side
Incoming sync
Snippet |
---|
if (firstSync && replica.project.key != "HELP") { return } else if (!firstSync && replica.project.key != "HELP") { // stop sync if the local issue has been moved from the HELP project final def _syncInitService = com.atlassian.jira.component.ComponentAccessor .getOSGiComponentInstanceOfType(com.exalate.api.trigger.ISyncInitiationService.class) _syncInitService.unexalate(issueKey.id as String) return } // the rest of the script remains untouched and goes after this `if` |
Jira Cloud
Continue sync, but don't apply any changes if the issue has been moved to another project
Use this approach if moved issues might be moved back at some point of time.
Source side
Incoming sync
Snippet |
---|
if (!firstSync && issue.project.key != "HELP") { // don't apply any changes if the local issue has been moved from the HELP project return } // the rest of the script remains untouched and goes after this `if` |
Destination side
Incoming sync
Snippet |
---|
if (firstSync && replica.project.key != "HELP") { return } else if (!firstSync && replica.project.key != "HELP") { // don't apply any changes if the remote issue has been moved from the HELP project return } // the rest of the script remains untouched and goes after this `if` |
Stop the sync if the issue has been moved to another project
Use this approach if moved issues would not be moved back at some point of time.
If the issue is moved back, it triggers sync once again by creating a new twin issue.
Source side
Incoming sync
Snippet |
---|
if (!firstSync && issue.project.key != "HELP") { // stop sync if the local issue has been moved from the HELP project if (!firstSync) { syncHelper.unExalateAfterProcessing() } return } // the rest of the script remains untouched and goes after this `if` |
Destination side
Incoming sync
Snippet |
---|
if (firstSync && replica.project.key != "HELP") { return } else if (!firstSync && replica.project.key != "HELP") { // stop sync if the remote issue has been moved from the HELP project if (!firstSync) { syncHelper.unExalateAfterProcessing() } return return } // the rest of the script remains untouched and goes after this `if` |