diff options
Diffstat (limited to 'app/services/system_notes/time_tracking_service.rb')
-rw-r--r-- | app/services/system_notes/time_tracking_service.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/services/system_notes/time_tracking_service.rb b/app/services/system_notes/time_tracking_service.rb index 8de42bd3225..650e40680b1 100644 --- a/app/services/system_notes/time_tracking_service.rb +++ b/app/services/system_notes/time_tracking_service.rb @@ -16,6 +16,8 @@ module SystemNotes def change_due_date(due_date) body = due_date ? "changed due date to #{due_date.to_s(:long)}" : 'removed due date' + issue_activity_counter.track_issue_due_date_changed_action(author: author) if noteable.is_a?(Issue) + create_note(NoteSummary.new(noteable, project, author, body, action: 'due_date')) end @@ -38,6 +40,8 @@ module SystemNotes "changed time estimate to #{parsed_time}" end + issue_activity_counter.track_issue_time_estimate_changed_action(author: author) if noteable.is_a?(Issue) + create_note(NoteSummary.new(noteable, project, author, body, action: 'time_tracking')) end @@ -67,7 +71,15 @@ module SystemNotes body = text_parts.join(' ') end + issue_activity_counter.track_issue_time_spent_changed_action(author: author) if noteable.is_a?(Issue) + create_note(NoteSummary.new(noteable, project, author, body, action: 'time_tracking')) end + + private + + def issue_activity_counter + Gitlab::UsageDataCounters::IssueActivityUniqueCounter + end end end |