Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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}
Atlassian Partner
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}
Atlassian Partner
June 2, 2021

My pleasure.

Have a good one.

-G.

Like Rus likes this

Suggest an answer

Log in or Sign up to answer