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/system_notes/time_tracking_service.rb')
-rw-r--r--app/services/system_notes/time_tracking_service.rb14
1 files changed, 10 insertions, 4 deletions
diff --git a/app/services/system_notes/time_tracking_service.rb b/app/services/system_notes/time_tracking_service.rb
index 68df52a03c7..c5bdbc6799e 100644
--- a/app/services/system_notes/time_tracking_service.rb
+++ b/app/services/system_notes/time_tracking_service.rb
@@ -21,7 +21,7 @@ module SystemNotes
# Using instance_of because WorkItem < Issue. We don't want to track work item updates as issue updates
if noteable.instance_of?(Issue) && changed_dates.key?('due_date')
- issue_activity_counter.track_issue_due_date_changed_action(author: author)
+ issue_activity_counter.track_issue_due_date_changed_action(author: author, project: project)
end
work_item_activity_counter.track_work_item_date_changed_action(author: author) if noteable.is_a?(WorkItem)
@@ -50,7 +50,9 @@ 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)
+ if noteable.is_a?(Issue)
+ issue_activity_counter.track_issue_time_estimate_changed_action(author: author, project: project)
+ end
create_note(NoteSummary.new(noteable, project, author, body, action: 'time_tracking'))
end
@@ -81,7 +83,9 @@ module SystemNotes
body = text_parts.join(' ')
end
- issue_activity_counter.track_issue_time_spent_changed_action(author: author) if noteable.is_a?(Issue)
+ if noteable.is_a?(Issue)
+ issue_activity_counter.track_issue_time_spent_changed_action(author: author, project: project)
+ end
create_note(NoteSummary.new(noteable, project, author, body, action: 'time_tracking'))
end
@@ -107,7 +111,9 @@ module SystemNotes
text_parts << "at #{spent_at}" if spent_at && spent_at != DateTime.current.to_date
body = text_parts.join(' ')
- issue_activity_counter.track_issue_time_spent_changed_action(author: author) if noteable.is_a?(Issue)
+ if noteable.is_a?(Issue)
+ issue_activity_counter.track_issue_time_spent_changed_action(author: author, project: project)
+ end
create_note(NoteSummary.new(noteable, project, author, body, action: 'time_tracking'))
end