The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Get all sub task status before Parent Transition conditional execution

Nicolas Drabik
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!
June 1, 2017

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.