Hi everyone!
I would like to order a board filter based on a custom date field.
If the date field is empty first and then sorted form smallest to biggest date.
My try to cascade the order didn’t work well.
The sort field is referenced multiple times in the JQL sort and forced an error.
Thanks in advance
Cheers Ralf
Hello everyone
Unfortunately Jira does not support this kind of sorting.
One solution I haven't tested yet would be to introduce another variable for the empty fields and include them in the sorting.
We will see when this effort will be worthwhile to implement.
Thanks to all supporters, regards
can you please share your query please for a better understanding.
usually what it takes to do the above is adding Sort by {{name of field}} to the end of your board query, however providing your query you are using and the error you have got would be helpful.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here my filter JQL
project = TEST ORDER BY cf[11111] DESC, status ASC, priority DESC, cf[22222]
cf[22222] is my date field
Goal: First all empty issues then sorted by date started with the smallest value
Thanks a lot
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Apologies for not getting back to you earlier on this.
your query shall work with the below update
project = TEST ORDER BY cf[11111] DESC, status ASC, priority DESC, cf[22222] ASC
however, please note that ordering in your query follows the sequence of fields mentioned above.
so tickets will first be sorted in DESC based for cf[11111] then as per status then priority and last cf[22222]...in case cf[11111] this mixed ordering based on two date fields cf[11111] && cf[22222] will not work. only one date field can be in the sorting.
hope the above helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Antuan Sammak _ FusionTech Innovations
Thanks for staying at the case.
I've testet your solution an my apologies, i have make a mistake.
The relevant field is cf[11111] desc at the beginning.
So i got all empty results at first.
But the followed ones are sorted (while using desc) biggest first.
I need them order smallest first after the empty results.
Goal:
Cheers Ralf
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Apologies for not getting back earlier to you on this but i was on holiday.
as far as i am aware, the built in behavior of Jira doesnt support that kind of sorting, when you are ordering based on a field then the empty ones will show in the beginning in case you use DESC. but if you use ASC then the empty ones will show last.
Hope the above helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.