Project

General

Profile

Actions

Defect #24484

open

Wrong order of rows with empty custom fields

Added by Ivan Zabrovskiy over 7 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Custom fields
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

Issues, sorted by custom field, appears in a countr-intuitive order. Issues with empty custom field goes before issues with any value.

Example (PostgreSQL, descending order):

Current result:

id Integer custom field (desc order)
143 <empty>
112 <empty>
95 2000
456 1900
73 1400

Expected result:

id Integer custom field (desc order)
95 2000
456 1900
73 1400
143 <empty>
112 <empty>

Solution: in Redmine::FieldFormat::Base in method join_for_order_statement (lib/redmine/field_format.rb line 279) remove row

" AND #{alias_name}.value <> ''" +

In this case, rows with empty custom field will be invoved in sorting and appear on proper places.

No data to display

Actions

Also available in: Atom PDF