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

Pablo Beltran
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 27, 2017

Hi,

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.

Example:

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?

 

Regards,

Pablo

 

 

1 answer

2 votes
Ignacio Pulgar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 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.

Pavel Bulanov August 11, 2017

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