diff options
author | Jan Provaznik <jprovaznik@gitlab.com> | 2018-01-11 17:22:00 +0100 |
---|---|---|
committer | Jan Provaznik <jprovaznik@gitlab.com> | 2018-01-18 12:27:02 +0100 |
commit | 4b6b8eccedb49014d4cd329a336015fb8d7bcff9 (patch) | |
tree | 3d6112c7aa65e03b1c44a1ad085ac33ec492684c /app | |
parent | a4eb71dcfabbb27df1d4461cbb924ff1a4c3b1b8 (diff) | |
download | gitlab-ce-4b6b8eccedb49014d4cd329a336015fb8d7bcff9.tar.gz |
Return last edited time instead of update time41247-timestamp
For issuable models we keep two timestamps:
updated_at which is updated whenever any model attribute is changed,
last_edited_at which is changed when only title or description is
changed.
In UI bellow description we display who and when updated the item. But
last_edited_by (used for 'who') is mistakenly combined with updated_at
(when), last_edited_at should be used instead.
Closes #41247
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/concerns/issuable_actions.rb | 2 | ||||
-rw-r--r-- | app/helpers/issuables_helper.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/concerns/issuable_actions.rb b/app/controllers/concerns/issuable_actions.rb index 74a4f437dc8..337957c366d 100644 --- a/app/controllers/concerns/issuable_actions.rb +++ b/app/controllers/concerns/issuable_actions.rb @@ -45,7 +45,7 @@ module IssuableActions } if issuable.edited? - response[:updated_at] = issuable.updated_at + response[:updated_at] = issuable.last_edited_at.to_time.iso8601 response[:updated_by_name] = issuable.last_edited_by.name response[:updated_by_path] = user_path(issuable.last_edited_by) end diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb index 2668cf78afe..16f39ac96bd 100644 --- a/app/helpers/issuables_helper.rb +++ b/app/helpers/issuables_helper.rb @@ -241,7 +241,7 @@ module IssuablesHelper return {} unless issuable.edited? { - updatedAt: issuable.updated_at.to_time.iso8601, + updatedAt: issuable.last_edited_at.to_time.iso8601, updatedBy: { name: issuable.last_edited_by.name, path: user_path(issuable.last_edited_by) |