How can we connect multiple ZenDesk tickets to a single JIRA Issue

Originally asked by Gautam Dama on 24 August 2021 (original question)


I already have custom code to map tickets to specific JIRA projects based on Domain. But I want to be able to link ticket from ZenDesk to existing issues in JIRA. Here is my incoming sync in JIRA

def remoteDomain = replica.customFields.“Domain”.value.value
def projectMapping = [
“accounting”:“PANELMEDIA”,
“android/ios”:“MC”,
“android recorder”:“MC”,
“api”:“APIE”,
“”:“”,
“”:“”,
“”:“”,
“”:“”,
“”:“”,
“”:“”,
“”:“”,
“”:“”,
“”:“”,
]
def domainMapping = [
“android/ios”:“Android/iOS”,
“android recorder”:“Android Recorder”,
“api”:“API”
]
def newProjectKey = projectMapping[remoteDomain]

if(firstSync){
// issue.projectKey = “EITP”
issue.projectKey = newProjectKey
// Set type name from source issue, if not found set a default
issue.typeName = nodeHelper.getIssueType(replica.type?.name, issue.projectKey)?.name ?: “Bug”
}

issue.summary = replica.summary
issue.description = replica.description
issue.comments = commentHelper.mergeComments(issue, replica)
issue.attachments = attachmentHelper.mergeAttachments(issue, replica)
issue.labels = replica.labels

def severityMap = [
“low”: “Low”,
“medium”: “Medium”,
“high” : “High”,
“blocker” : “Blocker”
] // [“remote options” : “local option”]
def remoteValue = replica.customFields.“Severity”.value.value
issue.customFields.“Severity”.value = severityMap[remoteValue] ?: remoteValue
issue.customFields.“Domain”.value = domainMapping[remoteDomain] ?: remoteDomain


Comments:

Ariel Aguilar commented on 24 August 2021

Hi Gautam,

You can refer to the Connect Operation here:

https://docs.idalko.com/exalate/x/MgBf

Kind regards,

Ariel

Gautam Dama commented on 24 August 2021

I tried using Connect, but I got an error saying there is an existing connection

Error message from remote side using connection ZenDesk_to_JIRA: ‘Could not connect `108` to `APIE-378`: issue by key `APIE-378` already was connected to another issue using connection `ZenDesk_to_JIRA`. You can perform unexalate on `APIE-378` to be able to connect it’

Ariel Aguilar commented on 27 August 2021

Hi Gautam,

This means the target ticket was already in synched for the same connection. What are you looking for if the ticket is already in-sync?

Kind regards,

Ariel