Forums

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

SQL query with showing stories NOT in a specific epic

Anita Kalmane
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.
August 12, 2021

Any JIRA SQL ppl there? I need a simple query to show all stories on the board EXCEPT if they are under a particular epic (let's call it epic QA Automation). When trying 'project = RA AND "Epic Name" != "QA Automation" ORDER BY Rank ASC' , it gives me only epics as a result, not all stories under them.

2 answers

1 accepted

0 votes
Answer accepted
Anita Kalmane
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.
August 16, 2021

A colleague helped me and it's now solved! For those interested, this is the query I used in the end: project = RA AND ("Epic Link" != RA-1111 or "Epic Link" is EMPTY) ORDER BY Rank ASC

1 vote
Jack Brickey
Community Champion
August 12, 2021

I suspect you are wanting something like this…

"Epic Link" != “xxxx” and "Epic Link" is not empty

you need to find the epic link associated with the epic of interest here and replace “xxxx”. The is not empty is to ensure you exclude stories that don’t belong to any epic.

Radek Dostál
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.
August 12, 2021

Also, let's not confuse SQL with JQL - they may be structurally similar but they have nothing to do with one another. SQL would be database queries, in general, JQL is only Jira Query Language used only by Jira and that's that - it may eventually be converted to sql somewhere down the code but they're certainly not the same thing. It's a good distinction to make - "sql" is bound to confuse people, not to be the grammar police but wanted to point that out :)

Like # people like this
Jack Brickey
Community Champion
August 12, 2021

Agree and based on the example that @Anita Kalmane presented I assume she is looking for JQL.

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer