In some cases, you need the workflow transitions to be different, depending on the issue type. 

This article shows how you can filter transitions based on the Issue Type's workflow.



Use case

Support engineer creates an issue on the Service Desk JIRA then it is synced to the Development Jira. Once the developer resolves the issue, it triggers a "resolving" transition. The transition trigger should be specific for different issue types.  


Script example

It is possible to trigger a transition on a specific issue type with the help of the getIssueType and the transition method of the workflowHelper.

The script includes some custom issue type names. Replace existing issue type names with the relevant ones.


Add the script to the Incoming sync rules

if (replica.resolution != null ) {
  if (issue.type == nodeHelper.getIssueType("Incident"))
{     workflowHelper.transition(issue, "Resolve")   }
  else if (issue.type == nodeHelper.getIssueType(
		"Service Request") || issue.type == nodeHelper.getIssueType("Custom Issue Type")
		)
{     workflowHelper.transition(issue, "Resolve this issue")   }}


See also