Home / JQL functions / descendantsOf()
descendantsOf() JQL function for Jira Cloud
Last updated 20/11/2026. Hooks is our product, and this page describes how its built-in function behaves.
descendantsOf() returns every level of work items underneath the ones your inner JQL matches: children, grandchildren and deeper. Syntax: issue in descendantsOf("jql"), or add a filter as a second argument to keep only matching descendants. It replaces ScriptRunner's childrenOf.
Syntax
issue in descendantsOf("jql")
issue in descendantsOf("jql", "filter JQL")
Every level of work items underneath the matches, optionally only those matching a filter. The function name is not case sensitive in the search bar, and you can use it anywhere Jira accepts JQL: the search bar, saved filters, boards, dashboard gadgets and subscriptions.
Arguments
| Argument | What it does |
|---|---|
jql | Required. A JQL query. The function walks down from everything it matches. |
filter | Optional. A JQL query, for example "statusCategory != Done". Only descendants that match it are returned. |
What it returns
Rolling work up is easy in Jira; asking for everything under a set of parents is not. descendantsOf lets you pick the parents with a normal query and get the whole tree below them, however many levels deep. That is the basis for programme reports, release scopes and clean-up jobs.
Three worked examples
Board filter: everything under this quarter's initiatives
issue in descendantsOf("project = ACME AND issuetype = Initiative AND fixVersion = 2026.Q4") AND statusCategory != Done
A delivery board backed by this filter shows all open work under the quarter's initiatives, whatever level it sits at. Add a child to any epic and it appears.
Dashboard gadget: unestimated work in an epic tree
issue in descendantsOf("key = WEB-88") AND "Story Points" is EMPTY
A gadget showing this count helps the product owner see how much of the epic is still unsized.
Automation: close out a finished epic tree
issue in descendantsOf("project = PLAT AND issuetype = Epic AND resolved >= -1d") AND resolution is EMPTY
A daily automation rule can find open work still hanging under epics resolved yesterday and ask the owner to confirm or move it.
Saving it as a filter
There is nothing app-specific to save. Compose the query in Jira's own search bar, save it as a normal Jira filter, and use that filter on boards, dashboards, gadgets and subscriptions. The JQL functions tab in Hooks has a Try a search panel that previews the first matches of a query before you save it, which is a quick way to check the inner JQL does what you expect.
Using not in
Every built-in function returns the correct set for not in. issue not in descendantsOf(...) matches every work item except the ones the function returns. A match that sits under another match is returned too, because it is that match's descendant. With not in you get every work item except the descendants.
issue not in descendantsOf("jql")
Limits you will see
- The inner search scans up to 25,000 matches and the function returns up to 12,000 work items.
- A bigger result shows too many results. You never get a silently cut-off list.
- Results refresh within about 5 minutes of a change to your data.
- A search with an invalid inner query degrades to a no-match result, so a saved filter keeps working.
- Without a filter it walks up to 25,000 work items, and the 12,000 limit applies to the number of work items that have children, not to every leaf. With a filter you get the exact list of matching descendants, up to 12,000 work items, and a filter Jira cannot read is reported as an error even when there are no descendants.
ScriptRunner equivalent
In ScriptRunner you write issueFunction in descendantsOf(...). In Hooks you write issue in descendantsOf(...), and issueFunction not in becomes issue not in. ScriptRunner users write childrenOf("jql"). The Migrate from ScriptRunner tab renames it to descendantsOf("jql"). Saved Enhanced Search filters can be converted in place from the Migrate from ScriptRunner tab, which checks each one against ScriptRunner's current results first. See the migration docs and the Enhanced Search alternative guide.
Related functions
- childrenOf() - The direct children of the matches, one level down.
- subtasksOf() - The subtasks of the work items the inner JQL matches.
- ancestorsOf() - Parents, grandparents and so on up the hierarchy of the matches.
- All 15 built-in JQL functions, plus
hooked()for your own
Frequently asked questions
How deep does descendantsOf go?
Every level. Without a filter it walks up to 25,000 work items, and the 12,000 limit applies to the number of work items that have children, not to every leaf.
When do new children show up?
New children of a work item that already had children appear straight away. Children added under a work item that had none appear after the next refresh, usually within about a minute.
How many work items can descendantsOf() return?
Up to 12,000. The inner search scans up to 25,000 matches, and a bigger result shows too many results instead of a cut-off list.
What is the ScriptRunner equivalent of descendantsOf()?
Replace issueFunction in with issue in. ScriptRunner users write childrenOf("jql"). The Migrate from ScriptRunner tab renames it to descendantsOf("jql").