Originally asked by Viacheslav on 19 September 2019 (original question)
We get an error at the second iteration of the sync process.
Incoming rules look as follows:
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 = “LNOC”
// Set type name from source issue, if not found set a default
issue.typeName = “Incident”
}
issue.summary = replica.summary
issue.description = replica.description
issue.comments = commentHelper.mergeComments(issue, replica)
issue.attachments = attachmentHelper.mergeAttachments(issue, replica)
issue.reporter = nodeHelper.getUser(replica.reporter?.key)
//issue.reporter = nodeHelper.getUserByEmail(replica.reporter?.email)
if (replica.status.name == “Escalated - Infra” && issue.status.name == “Waiting for customer” ) {
workflowHelper.transition(issue, “Respond to support”)
}
As I understand the error relates to the issue object and its status property, because when I remove it and keep only replica.status.name it starts working again.
Please, advise how to fix this issue.Source: Jira Cloud (old community)