diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-05 00:09:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-05 00:09:06 +0300 |
commit | f4726e9f5029931fc74aee9d5eff93d6a762dcff (patch) | |
tree | bc6d47ea3d39afdf46c5df3d8328f3f266c38ae5 /app/services/resource_events | |
parent | 7c221ba5ce130ca50b892e6dd32783e1327718df (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/resource_events')
-rw-r--r-- | app/services/resource_events/base_change_timebox_service.rb | 7 | ||||
-rw-r--r-- | app/services/resource_events/change_milestone_service.rb | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/app/services/resource_events/base_change_timebox_service.rb b/app/services/resource_events/base_change_timebox_service.rb index 5c83f7b12f7..d802bbee107 100644 --- a/app/services/resource_events/base_change_timebox_service.rb +++ b/app/services/resource_events/base_change_timebox_service.rb @@ -2,12 +2,11 @@ module ResourceEvents class BaseChangeTimeboxService - attr_reader :resource, :user, :event_created_at + attr_reader :resource, :user - def initialize(resource, user, created_at: Time.current) + def initialize(resource, user) @resource = resource @user = user - @event_created_at = created_at end def execute @@ -27,7 +26,7 @@ module ResourceEvents { user_id: user.id, - created_at: event_created_at, + created_at: resource.system_note_timestamp, key => resource.id } end diff --git a/app/services/resource_events/change_milestone_service.rb b/app/services/resource_events/change_milestone_service.rb index dcdf87599ac..24935a3327a 100644 --- a/app/services/resource_events/change_milestone_service.rb +++ b/app/services/resource_events/change_milestone_service.rb @@ -4,8 +4,8 @@ module ResourceEvents class ChangeMilestoneService < BaseChangeTimeboxService attr_reader :milestone, :old_milestone - def initialize(resource, user, created_at: Time.current, old_milestone:) - super(resource, user, created_at: created_at) + def initialize(resource, user, old_milestone:) + super(resource, user) @milestone = resource&.milestone @old_milestone = old_milestone |