Scriptrunner getStatus by id

Rus June 2, 2021

Hello Community,

i am using Simple scripted condition:

def origStatus = issue.getStatus().getSimpleStatus().getName()

if (origStatus != 'Done')
return true

 

It works well

 

i want to write the same script, but use status id,  not use status name

Could someone provide me with guidance regarding this issue

 

 

1 answer

1 accepted

1 vote
Answer accepted
Gökçe Gürsel {Appfire}
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
June 2, 2021

Hi @Rus ,

How about def origStatus = issue.getStatus().getSimpleStatus().getId() ? 

https://docs.atlassian.com/software/jira/docs/api/7.6.1/com/atlassian/jira/issue/status/SimpleStatus.html

-Gökçe

Rus June 2, 2021

It works. Thank you very much!

Gökçe Gürsel {Appfire}
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
June 2, 2021

My pleasure.

Have a good one.

-G.

Like Rus likes this

Suggest an answer

Log in or Sign up to answer