Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Search for an epic via jql

T_ Gök May 26, 2023

Hi,

I want to find via jql the epic of an issue e.g. task/story. Is this possible?

It works only from epic to task/story, but I couldn't find a query to identify the epic with the linked task/story.

3 answers

3 accepted

2 votes
Answer accepted
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 26, 2023 edited

So, as you pointed out, if you know the epic and want its children, you should run a JQL search.

In the reverse direction, if you know a child and want its epic, then you need to get the field value using the smart value {{issue.epic}}. No need for JQL here.

T_ Gök May 26, 2023

Thanks!

0 votes
Answer accepted
mauricio.groth
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.
May 26, 2023

Hi @T_ Gök

I’m Maurício, a support engineer at Appfire and I’m here to help you.

Unfortunately, using JQL of Jira, you’ll not be able to do it dynamically.

In the app where my team works, JQL Search Extensions for Jira, you can use this query to find the epic of a specific task or story:

issue in epicsOfChildrenInQuery("issuekey = key of task/story”)

Please contact our support if you have any other questions about this query.

We’ll be happy to help you!

Best regards,

Maurício

T_ Gök May 26, 2023

Thank you!

0 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 26, 2023

Hello @T_ Gök 

Are you working with issues in a Team Managed project or a Company Managed project?

What JQL do you use when you say "It works only from epic to task/story"?

There is not a native JQL function that will give you the parent Epics based on using the child issue key, but it can be obtained using third party apps. Would you consider a third party app to achieve your requirement, or do you already have any third party apps that extend the searching/JQL functionality?

T_ Gök May 26, 2023

Hi @Trudy Claspill,

thanks,

I can identify tasks/storys with the query "parentEpic = 'Key of Epic'" or "'Parent Link' = 'Key of Epic'"

but it doesn't seem to exist a query the other way around. Is it possible with Scriptrunner and "issueFunction"? I'm working with automation and need to save the key of the epic in a smart value variable.

Regards

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 26, 2023

The ScriptRunner function epicsOf() works to find the Epic parent(s) of specified issues, but only for issues in Company Managed projects.

I have not tried using a ScriptRunner Enhanced Search filter in an Automation Rule.

Can you show us the Automation Rule you've constructed, and explain what you are trying to accomplish? There might be an alternate method, like using the Branch For / Related Issues / Epic(parent) option.

T_ Gök May 26, 2023

Thanks

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events