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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Apr 17, 2018 in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

765 views 2 19
Join discussion

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