Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2019-04-08 18:33:30 +0300
committerRémy Coutable <remy@rymai.me>2019-04-08 18:33:30 +0300
commit4317a2a3a2e39e4c2594b0b28abf7a8cc694eeab (patch)
treeb8077805258a7652e08ecce36a5532d40bf03a9c /app/models/concerns/noteable.rb
parent425377f35747131bed6550170af576d3028b28f9 (diff)
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.rb8
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