Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Refer to issue type by its name in Behaviour script

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.config.IssueTypeManager

IssueTypeManager issueTypeManager = ComponentAccessor.getComponent(IssueTypeManager)

issueTypeManager.getIssueType( getFieldById("issuetype").value.toString() ).name

1 comment

Leo Community Leader Oct 18, 2019 • edited

Hi @Hubert Sękowski

below snippet may help you

def issueType=getIssueContext().getIssueType().name

if(issueType == 'Task'){

  //your code





Like Hubert Sękowski likes this

Thnx @Leo 

Your code does the job and is shorter , so preferable :)


Log in or Sign up to comment