summaryrefslogtreecommitdiffstats
path: root/app/models/journal.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2022-07-17 04:40:01 +0000
committerGo MAEDA <maeda@farend.jp>2022-07-17 04:40:01 +0000
commitf52b3f90eb04bf312472660b35aae8edc15eb5d5 (patch)
tree06cc36220ef2dd0a5284ee28bd9a705a471e4305 /app/models/journal.rb
parent0afe0cf609b67f50e2758ec03f4dce0a322f91cb (diff)
downloadredmine-f52b3f90eb04bf312472660b35aae8edc15eb5d5.tar.gz
redmine-f52b3f90eb04bf312472660b35aae8edc15eb5d5.zip
Mark edited journal notes as "Edited" (#31505).
Patch by Marius BALTEANU. git-svn-id: https://svn.redmine.org/redmine/trunk@21713 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/journal.rb')
-rw-r--r--app/models/journal.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/journal.rb b/app/models/journal.rb
index 01d5debcd..919a07dd2 100644
--- a/app/models/journal.rb
+++ b/app/models/journal.rb
@@ -26,6 +26,7 @@ class Journal < ActiveRecord::Base
belongs_to :issue, :foreign_key => :journalized_id
belongs_to :user
+ belongs_to :updated_by, :class_name => 'User'
has_many :details, :class_name => "JournalDetail", :dependent => :delete_all, :inverse_of => :journal
attr_accessor :indice
@@ -78,6 +79,7 @@ class Journal < ActiveRecord::Base
safe_attributes(
'private_notes',
:if => lambda {|journal, user| user.allowed_to?(:set_notes_private, journal.project)})
+ safe_attributes 'updated_by'
# Returns a SQL condition to filter out journals with notes that are not visible to user
def self.visible_notes_condition(user=User.current, options={})