Project

General

Profile

Actions

Defect #41079

closed

Incorrect sorting of users grouped by status in issue filters for administrators

Added by Vladislav Moiseev 4 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Filters
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

In #15201 default sorting for filter options linked with principals (users) was changed.
And now principal options into issue query filters for system admins was broken.

Attached patch for current trunk is fixed this problem.

Redmine instance info


Files

query.rb.patch (1.39 KB) query.rb.patch Vladislav Moiseev, 2024-07-30 20:33
clipboard-202407311446-b3ipf.png (163 KB) clipboard-202407311446-b3ipf.png Go MAEDA, 2024-07-31 07:46
2024-07-31_16-29-40.png (132 KB) 2024-07-31_16-29-40.png Vladislav Moiseev, 2024-07-31 14:34
users.csv (973 Bytes) users.csv Vladislav Moiseev, 2024-07-31 14:35
2024-07-31_16-33-00.png (76.5 KB) 2024-07-31_16-33-00.png Vladislav Moiseev, 2024-07-31 14:36
test-41079.patch (894 Bytes) test-41079.patch Go MAEDA, 2024-08-04 14:44

Related issues

Related to Redmine - Feature #15201: Filter "Assignee" should contain locked usersClosedGo MAEDA

Actions
Has duplicate Redmine - Defect #33616: Assignee & Author Dropdown SortClosed

Actions
Actions #1

Updated by Go MAEDA 4 months ago

I was unable to reproduce the issue you mentioned in my environment. The users in the dropdown are correctly sorted.
Could you please let me know how I can reproduce the problem?

Actions #2

Updated by Vladislav Moiseev 4 months ago

To reproduce this behaviour I installed new redmine instance with default configuration (English).
Then I imported users from users.csv (attached) using default wizard config like this:

Then I created new project, linked all active users and one locked ("ddd" in my case) as managers.

And.. filter sorting was broken:

Actions #3

Updated by Go MAEDA 4 months ago

  • Category set to Filters
  • Status changed from New to Confirmed

Thank you for letting me know the steps to reproduce the issue.
I have confirmed the issue.

Actions #4

Updated by Go MAEDA 4 months ago

I wrote a test to catch the wrong behavior.

$ bin/rails test test/unit/query_test.rb:3348

Run options: --seed 31819

# Running:

F

Failure:
QueryTest#test_assigned_to_values_should_be_sorted_by_status_and_name [test/unit/query_test.rb:3360]:
--- expected
+++ actual
@@ -1 +1 @@
-["000 000", "002 002", "004 004", "006 006", "008 008", "010 010", "012 012", "014 014", "016 016", "018 018", "001 001", "003 003", "005 005", "007 007", "009 009", "011 011", "013 013", "015 015", "017 017", "019 019"]
+["018 018", "016 016", "014 014", "012 012", "010 010", "008 008", "006 006", "004 004", "002 002", "000 000", "007 007", "009 009", "005 005", "011 011", "013 013", "003 003", "015 015", "017 017", "001 001", "019 019"]

bin/rails test test/unit/query_test.rb:3348
Actions #5

Updated by Go MAEDA 4 months ago

  • Target version changed from Candidate for next minor release to 5.0.10

Setting the target version to 5.0.10.

Actions #6

Updated by Go MAEDA 3 months ago

  • Related to Feature #15201: Filter "Assignee" should contain locked users added
Actions #7

Updated by Go MAEDA 3 months ago

  • Status changed from Confirmed to Resolved
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch in r22947. Thank you.

Actions #8

Updated by Go MAEDA 3 months ago

  • Subject changed from Wrong principal sorting into issue filters for sys-admins to Incorrect sorting of users grouped by status in issue filters for administrators
  • Status changed from Resolved to Closed
  • Target version changed from 5.0.10 to 5.1.4

Merged the change to the 5.1-stable branch.

Actions #9

Updated by Go MAEDA 2 months ago

  • Has duplicate Defect #33616: Assignee & Author Dropdown Sort added
Actions

Also available in: Atom PDF