forked from Trustie/forgeplus
更改:排序正序倒序
This commit is contained in:
parent
debefe2e7c
commit
cece63286e
|
@ -119,8 +119,8 @@ class Issue < ApplicationRecord
|
|||
}
|
||||
|
||||
scope :ordered_by_assigner, -> (sort_direction) {
|
||||
order("CASE WHEN u.id IS NULL THEN 1 ELSE 0 END #{sort_direction}")
|
||||
.order("COALESCE(u.nickname, u.login) DESC")
|
||||
order("CASE WHEN u.id IS NULL THEN 1 ELSE 0 END ASC")
|
||||
.order("COALESCE(u.nickname, u.login) #{sort_direction}")
|
||||
}
|
||||
after_create :incre_project_common, :incre_user_statistic, :incre_platform_statistic
|
||||
before_save :check_pm_and_update_due_date
|
||||
|
|
Loading…
Reference in New Issue