Forums

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

Checking parent issue is in a specific status before sub task transitions from one status to another

Keylane ICT May 27, 2020 edited

I've tried using the ScriptRunner plug in with a groovy script:

issue.parentObject.status.name == "REALISATION"

 

I used a conditional custom script to be placed at the transition between the statuses but it doesn't seem to work. I would like to use the scriptrunner plugin as we do not have the capacity for the jira workflow extension.

 

Thanks all.

1 answer

1 accepted

0 votes
Answer accepted
František Špaček _MoroSystems_
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.
May 27, 2020

Hello,

 

is really your status in capitals? Jira make them appear in capitals in UI, but you need to check proper status name in administration (Issues -> Statuses).

 

Also, better way to write the script like this:

issue.parentObject?.status?.name == "Realisation"

 Where ? makes it check if the object exists. In your solution if parentObject or status return null, script crashes. With ? it won't crash.

 

Have a nice day.

Keylane ICT May 27, 2020

Yes the status is really in capitals. Thank you for that insight, it did worked out in the end. :)

Margaret He
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 21, 2021

This script worked for me! Thank you!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.13.12
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events