Forums

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

JQL order by with condition

Roman Chernysh November 14, 2019

Is there a way to build a JQL to achieve the following order.

A list needs to be sorted by the start date, but if it is not present, then by the due date:

Example:

Issue Start_Date DueDate

i1                        1/1/2020

i2       2/1/2019   2/20/2020

i3                         2/10/2020

 

 

Thank you

1 answer

0 votes
Deleted user November 14, 2019

Hi @Roman Chernysh ,

Please use JQL as mentioned in the below:

project = demo ORDER BY Start_Date ASC, DueDate ASC

Here, JQL searches for all issues in 'demo' project and sorts them based on Start_Date in ascending order, if Start_Date is not present then sorts based on the DueDate in ascending order. FYI, you can use DESC to order the issues in descending order.

Thanks,

Raja

Suggest an answer

Log in or Sign up to answer