Get all sub task status before Parent Transition conditional execution Edited

Hi,

I'm trying to customize Parent Issue transition (JMWE plug-in) with conditional execution (groovy code)

I want for example to go back from In Progress to To Do if all SubTasks will be in To Do status

I have succed to check issue status and parent issue status with this code

if (issue.get("issuetype").name == "Sub-task")
   if (parentIssue.get("status").getName() == "In Progress")

Then I want to check status of all parent sub-task before return true

Pseudo-code:

for subTask in parentIssue {

   if(subTask.get("status").getName() != "To Do")

      if(subTask != issue)

         return false;

}

retrun true;

 

Does someone have an idea on how to implement this pseudo-code in real code in groovy conditionnal expression

Thanks in advance

0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,234 views 5 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you