1
0
-1

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()
    )
}
    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      The problem lies in the script - check the error message

       



      The problem is at line 22


      I suspect that this is  


      component.assigneeType?.name()
      
      

      But it is hard to see


      Note that there no such method type.name().  It is sufficient to put type.name

      Maybe thst is the reason

        CommentAdd your comment...