Patch #25066

Sort order with null placement (NULLS FIRST, NULLS LAST)

Added by Andrey Lobanov (RedSoft) 8 months ago. Updated 7 months ago.

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

0%

Category:Issues filter
Target version:-

Description

Added ability to sort with null placement. Sometimes it's very useful.
Tested on sqlite3, mysql, firebird, postgres.

Added_null_placement_at_order_statement.patch Magnifier (9.56 KB) Andrey Lobanov (RedSoft), 2017-02-14 13:05

Added_null_placement_at_order_statement_v2.patch Magnifier (36.8 KB) Andrey Lobanov (RedSoft), 2017-02-21 13:34

Null_placement_tests.patch Magnifier (4.42 KB) Andrey Lobanov (RedSoft), 2017-02-21 13:34


Related issues

Related to Redmine - Feature #6034: sorting should disregard blank fields New 2010-08-04

History

#1 Updated by Mischa The Evil 8 months ago

I find this interesting, but I don't know if this is something that is (going to be) widely used (thus not being something that might fit the core). At least, I haven't seen requests for this before. Could you maybe provide some use-case(s) describing where and how this could be used and to what purposes? And could you please provide some tests for this feature?

#2 Updated by Andrey Lobanov (RedSoft) 8 months ago

I'll certianly add some tests a bit later.
So in my company projects some fields can be null, and default sort order on this fields will put not null values at the end, and null values at the top. So this feature allows you to put null values in wanted place.

#4 Updated by Go MAEDA 8 months ago

  • Related to Feature #6034: sorting should disregard blank fields added

#5 Updated by Andrey Lobanov (RedSoft) 8 months ago

Here 2 new tests and few old tests fixed.
Also small fix, to complete tests (attachment also contains full patch with bug fixes).

#6 Updated by Andrey Lobanov (RedSoft) 7 months ago

Would someone review this feature?

Also available in: Atom PDF