Scriptrunner Get status object by name

Deleted user October 23, 2017

Hello :)

Just wondering if there is a get method to get an issue status object by name?

i know there is getLinkedStatusObjects() but it returns all status object in that issue?

Many thanks in advance, 
Pon

 

1 answer

1 accepted

1 vote
Answer accepted
Mizan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 23, 2017

It seems there is no such method. Why you do not create one ?

pseudo code :

Status getStatus(String name){

def workflowStatuses = getLinkedStatusObjects()

def status;

status=workflowStatuses.find{item -> item.name==name}

return status;

}

 

Deleted user October 26, 2017

Ahh thank you for this, coming from Python i didn't know about find { item -> ....etc }

 

thanks for that, 

Cheers,

Pon

Mizan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 26, 2017

Nice to hear you were able to figure it out .

Welcome :)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events