Note

We've packed up and moved from Confluence to Discourse to bring you a better, more interactive space. Out of courtesy we didn't migrate your user account so - you will have to signup again

The Exalate team will be on holiday for the coming days - returning Jan 4
Enjoy & stay safe

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

There are many facets to this use case. Let us look at how each object is synced across:

Epics

We can easily sync Epics in Jira Cloud by including the following lines of script:

...

We can include the exact same lines on the Server side to sync Epics, but please ensure that you have placed the Epics.groovy script in the correct Jira directory. 

Sprints

In order to send over the sprints from the Cloud side, we used the following script in the Outgoing side of Jira Cloud:

...

Code Block
languagegroovy
titleServer Incoming
def sprintV = replica.customFields.Sprint.value?.id.collect{ 
    remoteSprintId ->
    return nodeHelper.getLocalIssueKeyFromRemoteId(remoteSprintId, "sprint")?.id?.toString()
    }.findAll{it != null}
issue.customFields."Sprint".value = sprintV


Versions

In order to dynamically sync Versions between Cloud and Server side, we include the following script on the Outgoing side of both Server and Cloud:

...

Code Block
languagegroovy
titleIncoming
issue.fixVersions = replica
  .fixVersions
  .collect { v -> nodeHelper.createVersion(issue, v.name, v.description) }
issue.affectedVersions = replica
  .affectedVersions
  .collect { v -> nodeHelper.createVersion(issue, v.name, v.description) }

Components

In order to dynamically sync Components between Cloud and Server side, we include the following script on the Outgoing side of both Server and Cloud:

...

Code Block
languagegroovy
titleCloud Incoming
issue.components = replica.components.collect{
	nodeHelper.createComponent(
		issue, 
		it.name, 
		it.description, 
		it.leadKey, 
		it.assigneeType.name()
	)
} 

...