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:
Diffstat (limited to 'app/services/todo_service.rb')
-rw-r--r--app/services/todo_service.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/app/services/todo_service.rb b/app/services/todo_service.rb
index be7405cc896..168b36ea4d1 100644
--- a/app/services/todo_service.rb
+++ b/app/services/todo_service.rb
@@ -168,7 +168,11 @@ class TodoService
def mark_todo(target, current_user)
project = target.project
attributes = attributes_for_todo(project, target, current_user, Todo::MARKED)
- create_todos(current_user, attributes, target_namespace(target), project)
+
+ todos = create_todos(current_user, attributes, target_namespace(target), project)
+ work_item_activity_counter.track_work_item_mark_todo_action(author: current_user) if target.is_a?(WorkItem)
+
+ todos
end
def todo_exist?(issuable, current_user)
@@ -475,6 +479,10 @@ class TodoService
project = target.project
project&.namespace || target.try(:namespace)
end
+
+ def work_item_activity_counter
+ Gitlab::UsageDataCounters::WorkItemActivityUniqueCounter
+ end
end
TodoService.prepend_mod_with('TodoService')