The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

JQL for bugs in a list of Epics

Deleted user
April 24, 2023

Hi, I am trying to write a JQL that returns all the bugs in a list of epics. I have created a query that returns these epics. filter = "my epics". 

I build my query like this 

issuetype = Bug and "Epic Link" in (filter = "my epics") and I get

"Error in the JQL Query: ...."

If I use the epic issuekey instead of the filter, I get results. 

example: issuetype = Bug and "Epic Link" in (projectA-1, projectA-2) returns all the bugs in these 2 epics. 

 

I also have the scriptrunner but do not know how to use it for this scenario. 


Can I get some help please? 

 

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
Trudy P Claspill
Community Champion
April 24, 2023

Hello @[deleted] 

You need to use the issuesInEpics() function.

issueType = Bug and issuefunction issuesInEpics(<filter>)

I know that if you replace <filter> with the JQL that you used to select your Epics, and put that JQL in quotes, then the above should work.

I don't have a Jira Server/Data Center instance where I can test this out, so I don't know if you can replace <filter> with "filter = 'my epics'".

Deleted user
April 27, 2023

the issue was with the quotes around "my epics". I typed the query from scratch and it worked. 

Thanks

0 votes
CHINNAMUTHEVISAI.SATYANARAYANASHARMA
Contributor
April 24, 2023

Hi 
You can use epic link in JQL. like epic link = " Test" and issuetype = bug.

this will list out all the child issues for the epic and whose issue type is Bug

TAGS
AUG Leaders

Atlassian Community Events