It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage
Highlighted

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

}

 

BR,

Leo 

Like Hubert Sękowski likes this

Thnx @Leo 

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

Comment

Log in or Sign up to comment
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you