Get Issue Status in a Behaviour

Davin Studer
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.
December 27, 2017

So, I'm somewhat new to ScriptRunner. I'm liking it though. Especially the behaviours section. I'm currently trying to write an initializer that would hide/show certain fields on the issue edit screen based on the current status in the workflow. It it possible to get the current status of an issue in a behaviour? Thanks.

3 answers

1 accepted

Suggest an answer

Log in or Sign up to answer
12 votes
Answer accepted
Davin Studer
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.
December 27, 2017

Ok. I figured it out!!

underlyingIssue.getStatus().name
Jose Luis Casarrubias June 19, 2020

it worked like a charm! 

Thank you!

Siva Kumar Veerla July 16, 2021

Hi Davin,

It worked for me as well. where did you find 

Davin Studer
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.
July 16, 2021
Like Dirk Ronsmans likes this
0 votes
Ben van den Berg March 16, 2024

Thanks, @Davin Studer. This seems to pertain to the Data Center / On-prem platform.
Do you or anyone else have any idea how to get the status on the Jira Cloud platform?

0 votes
Maximiliano Javier Julio August 29, 2023

Could you please share your code?

TAGS
AUG Leaders

Atlassian Community Events