Questions for Confluence license has expired.

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

How to sync multiple entities ServiceNow to one Jira project?

 
2
1
0

We would like to know how to synchronize several ServiceNow entities in a Jira project, for example, Incident and Problem. Each of the entities would be assigned to an issue type, Incident would go to Bug and Problem would go to Task. How can we distinguish in the Jira incoming which entity is being synchronized? What ServiceNow value should be sent in the Outgoing?
Thank you very much
Best regards
D

    CommentAdd your comment...

    1 answer

    1.  
      2
      1
      0

      Could this be done by forcing the issuetype replica value for each of the entities in the servicenow outgoing?
      if(entityType == "incident") {
        replica.issueTypeName = "Bug"   
        replica.summary = incident.short_description
        replica.description = incident.description
        replica.comments = incident.comments
          ///otros campos soportados por la entidad incidente
      }
      if(entityType == "customerCase") {
          replica.issueTypeName = "Case"
          replica.summary = customerCase.short_description
          replica.description = customerCase.description
          replica.comments = customerCase.comments
          replica.attachments = customerCase.attachments
          ///otros campos soportados por la entidad customer case
      }
      BR


      1. Francis Martens (Exalate)

        Good suggestion.

        On the incoming sync in Jira, you can then specify


        if (firstSync) {
           issue.typeName = replica.issueTypeName
        
        }


        The only problem here, is that if you decide on the servicenow side what the target issuetype should be, you create a dependency between the two environments.

        A similar approach is sending the entityType 

        ServiceNow - Outgoing
        ...
        replica.sourceType = entityType
        ...



        And in the incoming

        Jira - Incoming
        def typeMap = [
            "incident" : "Bug",
            "Problem" : "Task"
        ]
        
        if (firstSync) {   
        
            // default to request if the incoming sourceType is not mapped correctly   
            issue.typeName = typeMap[replica.sourceType] ?: "Request"
        }



        Whenever the configuration changes on the Jira side, you can adapt it on the Jira side without requiring to access the servicenow side. 

      CommentAdd your comment...