Originally asked by Iskander Milgizin on 08 November 2019 (original question)
Good day, I’m trying to set component’s sync from Service Desk Cloud as Source to Jira Software Server as Destination according to this guide, but I get error on Destination. Thank you for help.
The Destination sync rule
if(firstSync){
// If it's the first sync for an issue (local issue does not exist yet)
// Set project key from source issue, if not found set a default
issue.projectKey = "MOD"
// Set type name from source issue, if not found set a default
issue.typeName = "CRM-заявка"
}
issue.summary = replica.summary
issue.description = replica.description
issue.comments = commentHelper.mergeComments(issue, replica)
issue.attachments = attachmentHelper.mergeAttachments(issue, replica)
def defaultUser = nodeHelper.getUserByEmail("skuzmenko@agentplus.ru")
issue.components = replica.components.collect { component ->
def remoteComponentLeadEmail = component.lead?.email
def localComponentLeadName = nodeHelper.getUserByEmail(remoteComponentLeadEmail)?.username
nodeHelper.createComponent(
issue,
component.name,
component.description,
localComponentLeadName ?: defaultUser.username,
component.assigneeType?.name()
)
}