1
0
-1

Hello,

I've got following error while sending new INC from Jira to be created in ServicNow:

Script error details: No signature of method: services.node.hubobjects.NodeHelper.getReference() is applicable for argument types: (String, String, com.exalate.basic.domain.hubobject.v1.BasicHubOption) values: [assignment_group, name, com.exalate.basic.domain.hubobject.v1.BasicHubOption@b319ba65] Possible solutions: getReference(java.lang.String, java.lang.String, java.lang.String). Error line: Script30.groovy:28


Outgoing script in Jira is here:


replica.customFields."11410" = issue.customFields."11410"


Incoming rule in SN looks as here:


def remoteAssignmentGroup = replica.customFields."11410"?.value
incident.assignment_group = nodeHelper.getReference("assignment_group", "name", remoteAssignmentGroup)?.sys_id


and payload from Jira to SN here:


"11410": {
        "id": 11410,
        "name": "Assignment Group",
        "type": "OPTION",
        "value": {
          "id": 11958,
          "sequence": 71,
          "value": "HLC-F-FIS",
          "disabled": false,
          "childOptions": []
        }



    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      Right configuration:

      def remoteAssignmentGroup = replica.customFields."11410"?.value?.value
      incident.assignment_group = nodeHelper.getReference("sys_user_group", "name", remoteAssignmentGroup)?.sys_id
        CommentAdd your comment...
      1.  
        1
        0
        -1
        def remoteAssignmentGroup = replica.customFields."11410"?.value

        remoteAssignmentGroup is a hubOption (com.exalate.basic.domain.hubobject.v1.BasicHubOption@b319ba65]

        You will need to get the value out of it by doing 


        def remoteAssignmentGroup = replica.customFields."11410"?.value?.value

        Give it a try

          CommentAdd your comment...