Forums

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

I need to write a query to get Epics and sort them with stories underneath - E1 (S1,2,3)E2(S1,2))

Saurabh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 15, 2020

I need to write a query to get Epics and sort them with stories underneath - E1 (S1,2,3)E2(S1,2)) and so on -hopefully sort by Priority 

This didn't work 

project = xxxx And issuetype in (Epic,Story) Order by rank Asc,priority DESC

1 answer

0 votes
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.
April 15, 2020

Hi @Saurabh  -- Welcome to the Atlassian Community!

This is not as easy as it should be with Jira.  JQL is not actually SQL...

There are marketplace add-ons which could help do this.

A work-around without an add-on would be to add a custom-field which is populated from either the Key for an epic or the Epic Link for a story.  Then, sort with ORDER BY your-custom-field ASC, IssueType DESC, Key ASC.

Best regards,

Bill

Saurabh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 15, 2020

Thanks for your response Bill-much appreciated !! I'll try this and get back.

Suggest an answer

Log in or Sign up to answer