diff options
author | Pedro Moreira da Silva <pedro@gitlab.com> | 2017-01-26 13:00:32 +0000 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2017-02-06 11:28:08 -0200 |
commit | 5316d1cf456df6707f2fb92807162541f96939a0 (patch) | |
tree | 35cc86a3cba5f5619bf64c70ec18bac12a4c022e /app/services/system_note_service.rb | |
parent | ed834c9ff1e7fcb8d5792b64c9f0e69e0eebfbe8 (diff) | |
download | gitlab-ce-5316d1cf456df6707f2fb92807162541f96939a0.tar.gz |
Remove noteable object in time tracking system notes [ci-skip]
Diffstat (limited to 'app/services/system_note_service.rb')
-rw-r--r-- | app/services/system_note_service.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/app/services/system_note_service.rb b/app/services/system_note_service.rb index 6f43f59a985..110072e3a16 100644 --- a/app/services/system_note_service.rb +++ b/app/services/system_note_service.rb @@ -118,18 +118,18 @@ module SystemNoteService # # Example Note text: # - # "removed time estimate on this issue" + # "removed time estimate" # - # "changed time estimate of this issue to 3d 5h" + # "changed time estimate to 3d 5h" # # Returns the created Note object def change_time_estimate(noteable, project, author) parsed_time = Gitlab::TimeTrackingFormatter.output(noteable.time_estimate) body = if noteable.time_estimate == 0 - "removed time estimate on this #{noteable.human_class_name}" + "removed time estimate" else - "changed time estimate of this #{noteable.human_class_name} to #{parsed_time}" + "changed time estimate to #{parsed_time}" end create_note(noteable: noteable, project: project, author: author, note: body) @@ -144,9 +144,9 @@ module SystemNoteService # # Example Note text: # - # "removed time spent on this issue" + # "removed time spent" # - # "added 2h 30m of time spent on this issue" + # "added 2h 30m of time spent" # # Returns the created Note object @@ -154,11 +154,11 @@ module SystemNoteService time_spent = noteable.time_spent if time_spent == :reset - body = "removed time spent on this #{noteable.human_class_name}" + body = "removed time spent" else parsed_time = Gitlab::TimeTrackingFormatter.output(time_spent.abs) action = time_spent > 0 ? 'added' : 'subtracted' - body = "#{action} #{parsed_time} of time spent on this #{noteable.human_class_name}" + body = "#{action} #{parsed_time} of time spent" end create_note(noteable: noteable, project: project, author: author, note: body) |