diff options
author | Sean McGivern <sean@gitlab.com> | 2019-04-08 15:33:30 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2019-04-08 15:33:30 +0000 |
commit | 4317a2a3a2e39e4c2594b0b28abf7a8cc694eeab (patch) | |
tree | b8077805258a7652e08ecce36a5532d40bf03a9c /app/models/concerns/noteable.rb | |
parent | 425377f35747131bed6550170af576d3028b28f9 (diff) | |
download | gitlab-ce-4317a2a3a2e39e4c2594b0b28abf7a8cc694eeab.tar.gz |
Fix `updated_at` doesn't apply to `state_event` updates of issues via API
Diffstat (limited to 'app/models/concerns/noteable.rb')
-rw-r--r-- | app/models/concerns/noteable.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/concerns/noteable.rb b/app/models/concerns/noteable.rb index 3c74034b527..423ce7e7db1 100644 --- a/app/models/concerns/noteable.rb +++ b/app/models/concerns/noteable.rb @@ -13,6 +13,14 @@ module Noteable end end + # The timestamp of the note (e.g. the :updated_at attribute if provided via + # API call) + def system_note_timestamp + @system_note_timestamp || Time.now # rubocop:disable Gitlab/ModuleWithInstanceVariables + end + + attr_writer :system_note_timestamp + def base_class_name self.class.base_class.name end |