]> source.dussan.org Git - redmine.git/commitdiff
Display order of watchers in the sidebar is indeterminate (#38458).
authorGo MAEDA <maeda@farend.jp>
Fri, 5 May 2023 03:49:12 +0000 (03:49 +0000)
committerGo MAEDA <maeda@farend.jp>
Fri, 5 May 2023 03:49:12 +0000 (03:49 +0000)
Patch by Holger Just.

git-svn-id: https://svn.redmine.org/redmine/trunk@22224 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/watchers_helper.rb

index dfd3d5c490438b47cf9bb522b92a161aca1fd3dd..d8a1e077591260b5c3d7f484171e2116ebdb2b22 100644 (file)
@@ -48,7 +48,7 @@ module WatchersHelper
   def watchers_list(object)
     remove_allowed = User.current.allowed_to?("delete_#{object.class.name.underscore}_watchers".to_sym, object.project)
     content = ''.html_safe
-    lis = object.watcher_users.collect do |user|
+    lis = object.watcher_users.sorted.collect do |user|
       s = ''.html_safe
       s << avatar(user, :size => "16").to_s
       s << link_to_principal(user, class: user.class.to_s.downcase)