diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-19 01:45:44 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-19 01:45:44 +0000 |
commit | 85dc423f7090da0a52c73eb66faf22ddb20efff9 (patch) | |
tree | 9160f299afd8c80c038f08e1545be119f5e3f1e1 /app/services/issuable/common_system_notes_service.rb | |
parent | 15c2c8c66dbe422588e5411eee7e68f1fa440bb8 (diff) | |
download | gitlab-ce-85dc423f7090da0a52c73eb66faf22ddb20efff9.tar.gz |
Add latest changes from gitlab-org/gitlab@13-4-stable-ee
Diffstat (limited to 'app/services/issuable/common_system_notes_service.rb')
-rw-r--r-- | app/services/issuable/common_system_notes_service.rb | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/app/services/issuable/common_system_notes_service.rb b/app/services/issuable/common_system_notes_service.rb index 84024cca68c..fbc72dc867a 100644 --- a/app/services/issuable/common_system_notes_service.rb +++ b/app/services/issuable/common_system_notes_service.rb @@ -22,7 +22,7 @@ module Issuable end create_due_date_note if issuable.previous_changes.include?('due_date') - create_milestone_note(old_milestone) if issuable.previous_changes.include?('milestone_id') + create_milestone_change_event(old_milestone) if issuable.previous_changes.include?('milestone_id') create_labels_note(old_labels) if old_labels && issuable.labels != old_labels end end @@ -94,23 +94,11 @@ module Issuable SystemNoteService.change_time_spent(issuable, issuable.project, issuable.time_spent_user) end - def create_milestone_note(old_milestone) - if milestone_changes_tracking_enabled? - create_milestone_change_event(old_milestone) - else - SystemNoteService.change_milestone(issuable, issuable.project, current_user, issuable.milestone) - end - end - def create_milestone_change_event(old_milestone) ResourceEvents::ChangeMilestoneService.new(issuable, current_user, old_milestone: old_milestone) .execute end - def milestone_changes_tracking_enabled? - ::Feature.enabled?(:track_resource_milestone_change_events, issuable.project, default_enabled: true) - end - def create_due_date_note SystemNoteService.change_due_date(issuable, issuable.project, current_user, issuable.due_date) end |