Forums

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

Query Help Please

Rawl Ramnidh September 13, 2021

Hi Friends, I'm trying to do a query that will give me this kind of result:

List all stories with an Epic listed in this Query.

 

Query A:

All Epics with a few specified PORTs aka 'Initiative Link' or 'Product Deliverable'

 

Query B:

All Stories that have those Epics listed in Query A

 

I have Query A working, showing the lists of Epics, but now it seems I can't get a working Query to list the Stories that have those Epics.

There would probably need to be some nesting. For some reason, it's not working.

 

This reasonable looking attempt did not work:

 

Type = Story and Epic in (Type = Epic AND "Product Deliverable" in (PORT-1111, PORT-, PORT-2222, PORT-3333)

 

Error in the JQL Query: Expecting ',' or ')' but got '='. (line 1, character 32)

2 answers

1 accepted

1 vote
Answer accepted
Bill Sheboy
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.
September 13, 2021

Hi @Rawl Ramnidh -- Welcome to the Atlassian Community!

JQL is not a SQL, and so it cannot do a join/query like that.

If you need this type of query often, please investigate purchase of marketplace apps which enhance JQL features: https://marketplace.atlassian.com/search

If you need this only once: consider exporting your list of epic keys to a spreadsheet, turn those results into a CSV list of keys, and then paste that into your second query, such as:

Type = Story and Epic in (myEpic-123, myEpic-456, etc.)

Kind regards,
Bill

Rawl Ramnidh September 13, 2021

I see, thanks for the explanation. I followed and was able to get some useful results.

Like Bill Sheboy likes this
1 vote
Kristján Geir Mathiesen
Community Champion
September 13, 2021

Hi @Rawl Ramnidh and welcome to the Community!

As @Bill Sheboy said, the queries can't be joined. However, you can use one Jira filter inside of another filter. For example, if you have a filter with the name "Assigned to KGM" that shows certain subset of issues. And then you want to exclude issues from ZDIG from that, you can do:

filter in("Assigned to KGM") AND project != ZDIG

Probably not quite what you were are looking for :) but hopefully leads you down a good path. Also note that some apps from the Marketplace add new JQL functionality that can be extremely useful.

HTH,
KGM

Rawl Ramnidh September 13, 2021

Thanks for this. Good to know!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events