JIRA SERVERJIRA CLOUD

There might be multiple use cases in issue types synchronization.

The Exalate app allows handling any possible combination of the issue type mapping.

Source side

To send the issue type, add this script  below to the Outgoing sync

replica.type = issue.type


Destination side

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, issue.projectKey)?.name ?: "Task"

  • 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 = [
      "Bug" : "Problem",
      "Task" : "Assignment"
    ]
    
    issue.typeName = issueTypeMapping[replica.type?.name] ?: "Assignment"


Supporting issue type changes

There are 2 ways to change the issue type in Jira: edit issue type field or change the type using move issue operation.

An issue type change is a move operation within Jira context. It requires some low-level JIRA data manipulation. 

Note

This will only work if workflow scheme of the target issue type is the same as the source issue type.

You can automatically trigger issue type change by move operation with the help of Exalate and Sync Rules. We've developed special external script for this - Move.groovy.

Check how to move issues automatically depending on a specific condition.


If you want to sync issue type with different workflows, please contact us at support@exalate.com for more details.


See also

How to sync multiple projects with multiple issues types?

How to keep the issue type when synchronize?

What is the difference between issue.type and issue.type.name?

How to move issues automatically


Back to advanced configuration