プロジェクト

全般

プロフィール

Vote #78006

未完了

Wrong order of rows with empty custom fields

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
Custom fields_14
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
14
version_id:
0
issue_org_id:
24484
author_id:
128697
assigned_to_id:
0
comments:
0
status_id:
1
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

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||
|112||
|95|2000|
|456|1900|
|73|1400|

Expected result:

|=. id|=. Integer custom field (desc order)|
|95|2000|
|456|1900|
|73|1400|
|143||
|112||

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.

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0