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
Ignacio Pulgar Community Champion Jan 27, 2017

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 Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,271 views 14 20
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot