Forums

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

Validate child issues are closed before parent issue is moving to completed status

Geethanjali S J
Contributor
October 5, 2021

Hi, 

We are using jira cloud. 

I think so we have build in workflow condition for this for sub tasks but our hierarchy is

Initiative

MBI, Sub Service

Epic

We would like to check each child issue types to be closed/done before the parent issue is closed

Here we have MBI as parent of an Epic

We need to prevent the MBI from being able to transition to complete unless all of its children are either in done or closed status. 

Please anyone can help me with this. 

Thanks,

Geethanjali. 

4 answers

0 votes
Kristian Walker _Adaptavist_
Community Champion
November 25, 2025

Hi Geethanjali ,

If you have ScriptRunner for Jira Cloud installed then you could use a workflow validator to block the transition of the work item when its linked item is not in the done status. 

Workflow validators use the Jira Expression framework which is documented here and you can use this documentation to see how to create the expresison you require.

We also have some examples in the dcoumentation here around using child issues, which you can use as a reference guide. 

If you need further help creating the expression, then you can raise a support request here and the ScriptRunner support team can help with this. 

I hope this helps.

Regards,

Kristian

0 votes
Sravan
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!
November 24, 2025

Surprised to see this still open.

Here is a simple script that works if you have script runner app:

Steps to implement:

Go to the workflow status

Validators -->  Add Validator --> Simple scripted validator (by scriptrunner) and use the below

..................................................

import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.status.Status

Issue parent = issue // explicitly typed

// Using recommended method — always returns Issue objects
def subtasks = parent.getSubTaskObjects()

// Allow transition if no subtasks
if (!subtasks || subtasks.isEmpty()) {
return true
}

def requiredStatus = "Done"

for (Issue subtask : subtasks) {

Status stStatus = subtask.getStatus()

// Block if any subtask is not Done
if (stStatus == null || stStatus.getName() != requiredStatus) {
return false
}
}

return true
......................................................
0 votes
Maciej Dudziak _Forgappify_
Atlassian Partner
August 28, 2024

Hi @Geethanjali S J @Frederik Hellstern 

There is no out-of-the-box validator that can do this, but it can be accomplished using Jira expression-based validators provided by some apps. There are several options available on the Atlassian marketplace.

I am from Forgappify, and we developed the Linked Issues Validator available as part of the Workflow Building Blocks for Jira app. With a wizard-like UI, you can select options that represent your case. You can choose relations from: sub-tasks, parent issues, stories and  children (includes all types of descendant issues), and linked issues. Additionally, you can filter relations by issue types and select criteria based on status category and status.

I would appreciate it if you could give it a try.

Cheers

0 votes
Ting
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 5, 2021

You can try out Sub-Task Blocking Condition (definition: Condition to block parent issue transition depending on sub-task status)

More other conditions can be found on Configure advanced issue workflows.

 

If you want the other way (block child issue to transition depends on parent's status), then you can use Parent Status Validator. Reference: Configure advanced issue workflows Use workflow validators for company-managed projects 

Geethanjali S J
Contributor
October 6, 2021

Actually that is not working for our requirement. 

Our hierarchy is

Portfolio level - initiative next

MBI, Sub Service

Epic

Here MBI is parent we are creating Epic under MBI by giving parent link. 

Geethanjali S J
Contributor
October 6, 2021

Can you please suggest an answer to my requirement

Like Frederik Hellstern likes this
Frederik Hellstern
August 1, 2024

Any luck on this?

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events