Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the Status field value

Peruma Chinnasamy August 22, 2022

Hi Team,

Right Now I am using Jira DC v8.20.21. I am developing some functionality using groovy script. Based on the status I need to give some activity.

But I don't know how to get the status field value.

I tried to get the status value following script but it is not working

 def sc = issue.getStatus().getName()

Kindly anyone help me to get the current status of the story. 

 

Thanks and Regards

Peruma.C

2 answers

0 votes
David Fischer
Community Champion
August 22, 2022

The best for that is to use JMCF's Transition Date/Time field. No scripting required. 

Peruma Chinnasamy August 22, 2022

Hi David Fischer _Appfire_

We are not using JMCF plugin instead of this can u give the input

Thanks and Regards

Peruma.C

0 votes
Alex Koxaras _Relational_
Community Champion
August 22, 2022

Hi @Peruma Chinnasamy 

How exactly are you trying to get this value? What app are you using and where do you run your code? In a workflow? On scriptrunner console? On JMWE groovy editor?

Peruma Chinnasamy August 22, 2022

 

Hi Alex Koxaras

By Groovy script


I am going to adding script filed for story screen that field should update the value 

if status = Deployed

then 

New_field = current_date 

Alex Koxaras _Relational_
Community Champion
August 22, 2022

So you are trying to add a Scriptrunner Script Field? Do you want to share a few screenshots of your field and your code?

Peruma Chinnasamy August 22, 2022

Hi Alex Koxaras

 

Yes I am trying to add the Scriptrunner Script Field

 

Suggest an answer

Log in or Sign up to answer