Questions for Confluence license has expired.

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

Jira assigned to ServiceNow assignment groups

 
1
0
-1

What is the best way to sync Jira "assigned to" field and "assignment groups" in ServiceNow

    CommentAdd your comment...

    1 answer

    1.  
      2
      1
      0

      Hi!


      To synchronize ServiceNow Assignment Groups to Jira Assignees bi-directionally, you will need to create a mapping between assignment groups and corresponding users in Jira, for example:


      Jira Outgoing Sync:

      replica.assignee = issue.assignee



      Jira Incoming Sync:


      def assigneeMapping = ["Assignment Group A":"jirauser@example.com",
                             "Assignment Group B":"jirauser2@example.com"]
      issue.assignee = nodeHelper.getUserByEmail(assigneeMapping[replica.assignment_group])


      ServiceNow Outgoing Sync:

      if(incident.assignment_group && incident.assignment_group != "")){
        replica.assignment_group = incident.assignment_group?.displayValue
      }


      ServiceNow Incoming Sync:

      def assignmentGroupMapping = ["jirauser@example.com":"Assignment Group A",
                             "jirauser2@example.com":"Assignment Group B"]
      def localAssignmentGroup = assignmentGroupMapping[replica.assignee?.email]
      incident.assignment_group = nodeHelper.getReference("assignment_group", "name", localAssignmentGroup)


      Thanks,


      André

        CommentAdd your comment...