Questions for Confluence license has expired.

Please purchase a new license to continue using Questions for Confluence.

How to save Configuration Item (CI) from Jira SD in ServiceNow?

 
1
0
-1

Hello Community,


I have following INC payload coming from Jira SD:


"customKeys": {

"CI": "abo20001"

},


CI record with above name ("abo20001") exists on SN side, and I would like to store it on a INC record in SN. My incoming script for it looks as below:


if (replica.customFields."customKeys"?.CI != null)

{

    def remote_CI = replica.customFields."customKeys"?.CI

    incident.description = remote_CI

    incident.cmdb_ci = nodeHelper.getReference("cmdb_ci", "cmdb_ci", replica.customFields."customKeys"?.CI)

}


For test reason, temporary I would like to store "CI" in description and cmdb_ci fields, but none of this works.

Please suggest right solution

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      After analyzing outgoing script from, ServiceNow incoming script has been modified and it works:


      incident.cmdb_ci = nodeHelper.getReference("cmdb_ci", "name", replica."customKeys"?.CI)?.sys_id

        CommentAdd your comment...