Patch #36438

Support nulls first/last option for sorting order of custom queries

Added by Dmitry Makurin 11 months ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:


Target version:-


A lot of RDBMS has support for placement of null values at the start or end using options nulls first/last.

Atached patch adds two more order options to the saved query:

  • Ascending nulls last.
  • Descending nulls first.

order options

And the result of issues sorted by due date ascending nulls last:

sported issues

Patch probably broken when using MySql since it doesn't have a straightforward syntax for order predicate but it's fine using SQLite3 or Postgres.

ksnip_20220117-150142.png - order options (41.7 KB) Dmitry Makurin , 2022-01-17 13:04

ksnip_20220117-150213.png - sported issues (106 KB) Dmitry Makurin , 2022-01-17 13:04

0001-nulls-last-first-option-for-sorting-order.patch Magnifier (4.67 KB) Dmitry Makurin , 2022-01-17 13:29

Also available in: Atom PDF