Defect #41079 » query.rb.patch
app/models/query.rb (working copy) | ||
---|---|---|
628 | 628 |
author_values = [] |
629 | 629 |
author_values << ["<< #{l(:label_me)} >>", "me"] if User.current.logged? |
630 | 630 |
author_values += |
631 |
users.sort_by(&:status).
|
|
631 |
users.sort_by{|p| [p.status, p]}.
|
|
632 | 632 |
collect{|s| [s.name, s.id.to_s, l("status_#{User::LABEL_BY_STATUS[s.status]}")]} |
633 | 633 |
author_values << [l(:label_user_anonymous), User.anonymous.id.to_s] |
634 | 634 |
author_values |
... | ... | |
638 | 638 |
assigned_to_values = [] |
639 | 639 |
assigned_to_values << ["<< #{l(:label_me)} >>", "me"] if User.current.logged? |
640 | 640 |
assigned_to_values += |
641 |
(Setting.issue_group_assignment? ? principals : users).sort_by(&:status).
|
|
641 |
(Setting.issue_group_assignment? ? principals : users).sort_by{|p| [p.status, p]}.
|
|
642 | 642 |
collect{|s| [s.name, s.id.to_s, l("status_#{User::LABEL_BY_STATUS[s.status]}")]} |
643 | 643 |
assigned_to_values |
644 | 644 |
end |
... | ... | |
668 | 668 |
watcher_values = [["<< #{l(:label_me)} >>", "me"]] |
669 | 669 |
if User.current.allowed_to?(:view_issue_watchers, self.project, global: true) |
670 | 670 |
watcher_values += |
671 |
principals.sort_by(&:status).
|
|
671 |
principals.sort_by{|p| [p.status, p]}.
|
|
672 | 672 |
collect{|s| [s.name, s.id.to_s, l("status_#{User::LABEL_BY_STATUS[s.status]}")]} |
673 | 673 |
end |
674 | 674 |
watcher_values |