1
0
-1

We want to sync fields Requested For & Item from SNOW to Jira. Both of these fields are of Reference type.

Please have a look on Sync rules from Jira and SNOW:
SNOW Outgoing:

//Requested for
def link = catalogTask.u_requested_for?.link
def parsedlink = (link =~ /.\/(.)/)
def user

if (parsedlink.matches())

{ user = nodeHelper.getReference("sys_user","sc_req_item","sys_id",parsedlink[0][1]) }

replica.customKeys.reporter = user?.name
}


Jira Incoming:

issue.reporter = nodeHelper.getUser(replica.customKeys.reporter?.name) ?: exalate



Error Message:

Script error details: No such property: exalate for class: Script115. Error line: Script115.groovy:36
    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      The error is rather related with line:

      issue.reporter = nodeHelper.getUser(replica.customKeys.reporter?.name) ?: exalate

      Where you are using a non declared variable exalate . You probably want to remove that default case or get an actual use using:

      issue.reporter = nodeHelper.getUser(replica.customKeys.reporter?.name) ?: nodeHelper.getUserByEmail("default@exalate.com")

      Using the right default email.

        CommentAdd your comment...