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
Hi Team,
I am very new to Exalate, I am trying to establish a connection between two Jira projects. The two Jira projects are identical.
The projects are located in the Datacenter and Jira cloud.
The cloud and Jira follow their own issuetypes and statuses.
When a ticket is created in the Jira Data center, a ticket should be made in cloud jira with the same data and vice versa.
I have successfully established a connection between Data Center and to Cloud, so when a ticket is created in the Datacenter with the help of a trigger a new issue is created in the cloud jira.
But, now when a new ticket is created in Jira cloud, in the Datacenter no ticket is created. Can you please help me with how this can be done?
This is my outgoing sync in Jira cloud
replica.key = issue.key
replica.type = issue.type
replica.assignee = issue.assignee
replica.reporter = issue.reporter
replica.summary = issue.summary
replica.description = issue.description
replica.labels = issue.labels
replica.comments = issue.comments
replica.resolution = issue.resolution
replica.status = issue.status
replica.parentId = issue.parentId
replica.priority = issue.priority
replica.attachments = issue.attachments
replica.project = issue.project
//Comment these lines out if you are interested in sending the full list of versions and components of the source project.
replica.project.versions = []
replica.project.components = []
/*
Custom Fields
replica.customFields."Summary" = issue.customFields."Summary"
replica.customFields."Fix Versions" = issue.customFields."Fix Versions"
replica.customFields."Priority" = issue.customFields."Priority"
replica.customFields."Labels" = issue.customFields."Labels"
replica.customFields."Sprint" = issue.customFields."Sprint"
replica.customFields."Description" = issue.customFields."Description"
replica.customFields."Attatchments" = issue.customFields."Attatchments"
replica.customFields."Story Points" = issue.customFields."Story Points"
replica.customFields."Start Date" = issue.customFields."Start Date"
replica.customFields."Due Date" = issue.customFields."Due Date"
replica.customFields."Client External ID" = issue.customFields."Client External ID"
replica.customFields."Linked Issues" = issue.customFields."Linked Issues"
replica.customFields."Environment" = issue.customFields."Environment"
*/
This is my Incoming sync in Jira cloud side.
if(firstSync){
issue.projectKey = "PILOT2"
// Set type name from source issue, if not found set a default
issue.typeName = nodeHelper.getIssueType(replica.type?.name, issue.projectKey)?.name ?: "BRD"
}
issue.summary = replica.summary
issue.description = replica.description
issue.comments = commentHelper.mergeComments(issue, replica)
issue.attachments = attachmentHelper.mergeAttachments(issue, replica)
issue.labels = replica.labels
issue.status = replica.status
issue.type = replica.type
def statusMappingStory = ["Refinement":"In Review", "Not Started":"Open", "In Progress":"In Progress", "Ready for Test Release":"Peer Review", "Ready for QE":"QA", "QE - Complete":"Acceptance Testing", "Done":"Closed", "Duplicate":"Closed", "Won't Do": "Closed", "Need More Info":"In Review"]
def remoteStatusNameStory = replica.status.name
issue.setStatus(statusMappingStory[remoteStatusNameStory] ?: remoteStatusNameStory)
def statusMappingBug = ["New":"In Review", "Not Started":"Open", "In Progress":"In Progress", "Ready for Test Release":"Peer Review", "Ready for QE":"QA", "QE - Complete":"Acceptance Testing", "Done":"Closed", "Duplicate":"Closed", "Won't Do":"Closed", "Rejected":"Closed", "Ready for Retest":"In Review", "Monitor":"In Review", "Reopen":"In Review"]
def remoteStatusNameBug = replica.status.name
issue.setStatus(statusMappingBug[remoteStatusNameBug] ?: remoteStatusNameBug)
def statusMappingSpike = ["Refinement":"In Review", "Backlog":"In Review", "Not Started":"Open", "In Progress":"In Progress", "Ready for QE":"QA", "QE - Complete":"Acceptance Testing", "Done":"Closed", "Won't Do":"Closed", "Need More Info":"In Review", "Reopen":"In Review"]
def remoteStatusNameSpike = replica.status.name
issue.setStatus(statusMappingSpike[remoteStatusNameSpike] ?: remoteStatusNameSpike)
//def statusMappingEpic = ["New":"In Review", "Refinement":"In Review", "Not Started":"Open", "In Progress":"In Progress", "Ready for Test Release":"Peer Review", "Ready for QE":"QA", "QE - Complete":"Acceptance Testing", "Done":"Closed", "Duplicate":"Closed", "Won't Do": "Closed", "Need More Info":"In Review"]
//def remoteStatusNameEpic = replica.status.name
//issue.setStatus(statusMappingEpic[remoteStatusNameEpic] ?: remoteStatusNameEpic)
//def typeMapping = ["Bug":"Project Bug"]
//def remoteTypeName = replica.type.name
//issue.setType(typeMapping[remoteTypeName] ?: remoteTypeName)
def issueTypeMappingBug = ["Bug" : "Project Bug", "Spike" : "BRD", "Story" : "Story"]
//issue.typeName = issueTypeMappingBug[replica.type?.name] ?: "Project Bug"
//def issueTypeMappingSpike = ["Spike" : "BRD"]
//issue.typeName = issueTypeMappingSpike[replica.type?.name] ?: "BRD"
//def issueTypeMappingEpic = ["Epic" : "Technical Review"]
//issue.typeName = issueTypeMappingEpic[replica.type?.name] ?: "Technical Review"
/*Move.receive(
["PILOT":"PILOT2"],
["Bug":"Project Bug","Spike":"BRD","Epic":"Technical Review"],
[:],
replica,
issue
)*/
/*
User Synchronization (Assignee/Reporter)
Set a Reporter/Assignee from the source side, if the user can't be found set a default user
You can use this approach for custom fields of type User
def defaultUser = nodeHelper.getUserByEmail("default@idalko.com")
issue.reporter = nodeHelper.getUserByEmail(replica.reporter?.email) ?: defaultUser
issue.assignee = nodeHelper.getUserByEmail(replica.assignee?.email) ?: defaultUser
*/
/*
Comment Synchronization
Sync comments with the original author if the user exists in the local instance
Remove original Comments sync line if you are using this approach
issue.comments = commentHelper.mergeComments(issue, replica){ it.executor = nodeHelper.getUserByEmail(it.author?.email) }
/*
Status Synchronization
Sync status according to the mapping [remote issue status: local issue status]
If statuses are the same on both sides don't include them in the mapping
def statusMapping = ["Open":"New", "To Do":"Backlog"]
def remoteStatusName = replica.status.name
issue.setStatus(statusMapping[remoteStatusName] ?: remoteStatusName)
*/
/*
Custom Fields
This line will sync Text, Option(s), Number, Date, Organization, and Labels CFs
For other types of CF check documentation
issue.customFields."Summary".value = replica.customFields."Summary".value
issue.customFields."Fix Versions".value = replica.customFields."Fix Versions".value
issue.customFields."Priority".value = replica.customFields."Priority".value
issue.customFields."Labels".value = replica.customFields."Labels".value
issue.customFields."Sprint".value = replica.customFields."Sprint".value
issue.customFields."Attachments".value = replica.customFields."Attachments".value
issue.customFields."Description".value = replica.customFields."Description".value
issue.customFields."Story Points".value = replica.customFields."Story Points".value
issue.customFields."Planned Start Date".value = replica.customFields."Start Date".value
issue.customFields."Due Date".value = replica.customFields."Due Date".value
issue.customFields."External ID".value = replica.customFields."Client External ID".value
issue.customFields."Linked Issues".value = replica.customFields."Linked Issues".value
issue.customFields."Environment".value = replica.customFields."Environment".value
*/
Hi there!
Have you tried setting up a trigger in the Jira Cloud side?
Kind regards,
Ariel