is there any built-in function to use jql in jql?


Please pay attention to the question as I'm aware that there are tons of 3rd party plugins (including those developed by me) able to do it. So the exact question is in regard of the default JIRA functionality without 3rd party plugins.


1) Get all the Epics:

type = Epic


2) Get all the issues belonging to a given Epic (ex: SPS-355)

"Epic Link" = SPS-255


But.. is it possible combine both into a single one? Something like:

"Epic Link" in { type = Epic }

guessing that would be a bracket operator \{...\} which would perform the internal JQL. Similarly:

"Epic Link" in jql("type = Epic")

Such basic jql function that takes a jql string as input param and executes it is really easy to create via plugins. But my question is: does it or something equivalent already exist?






1 answer

2 votes

There are kind-of built-in ways to achieve it.

You may save your query as a filter, ie. with name 'Epics' with this jql:

type = Epic

After that, you can use your saved filter in other queries like this:

resolution is EMPTY and filter in (Epics)

You can use either the filter name or the filter id, minding that using the filter name can produce different results in the case another shared filter from a different user had the same name, as it might return that other filter's query instead of yours.

By the way, in regard to epics, we have a new cool function in JIRA Cloud: parentEpic()

It is similar to "Epic Link", but it returns all subtasks that belong to any issues from the specified epic, besides of the standard issues (not-subtask type) in that epic.

Hope it helps.

Where parentEpic function is now? There is no such function reference by the link you provided (page Advanced searching - functions reference )

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Wednesday in Jira

Make your Atlassian Cloud products more secure: our NEW admin security guide

Hey admins! I’m Dave, Principal Product Manager here at Atlassian working on our cloud platform and security products. Cloud security is a moving target. As you adopt more products, employees consta...

441 views 0 9
Read article

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