How to Sync IssueTypes in Zendesk

    There are multiple use cases in issue types synchronization.

    With Exalate, you can handle any possible combination of the issue type mapping.

    Source side

    Outgoing sync

    To send the issue type, add the script below:

    replica.type = issue.type

    Destination side

    Incoming sync

    There are different approaches to how you can set the issue type on the receiving side, depending on your specific use case. To add the issue type on a synced issue you should add the script to the incoming sync. Below you can find some of the most common cases:

    • Set the issue type name from the source issue, if not found set a default one:

      // Set type name from source issue, if not found set 'Task' as the default target issue type
      issue.typeName = nodeHelper.getIssueType(replica.type?.name)?.name ?: nodeHelper.getIssueType("incident")?.name
    • Set the issue type according to the mapping, specified with the help of Groovy scripts:

      //map issue types between source and destination instances.
      def issueTypeMapping = [
      // "remote issue type" : "local issue type"
        "Bug" : "assignment",
        "Task" : "task"
      ]
       
      issue.typeName = issueTypeMapping[replica.type?.name] ?: "assignment" 

    Have more questions? Ask the community