---
title: "Preventing an Epic from Closing Until All Children Are Closed"
canonical: "https://support.appfire.com/space/SUPPORT/80878371/Preventing%20an%20Epic%20from%20Closing%20Until%20All%20Children%20Are%20Closed"
format: markdown
---
What would the quickest and easiest validator script to prevent an Epic from closing until all the children are closed?

## Background

The following solution requires a SIL Validator. For more information on SIL Validators, see [this documentation](https://appfire.atlassian.net/wiki/spaces/JJUPIN/pages/13240802/Customizing+workflows#Customizingworkflows-Forvalidators).

## Solution

In this scenario, we would loop through all the children until we found one that is open. Once we do find one open, return false to the SIL Validator.

|  |
| --- |
| ```
string jql = "\"Epic Link\" = " + key;
string [] issues = selectIssues(jql);
 
 
for (string issue in issues) {
    if (issue.status != "Done") {
        return false, status, "You still have children of Epic " + key.#{Epic Name} + " open.";
    }
}
``` |

## Additional Help

Need help implementing this script? Talk to me directly to me by clicking on the bot on this page.

## Related articles



> Macro (contentbylabel)

> Macro (details)
> 
> | Related issues |  |
> | --- | --- |