diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2018-04-18 08:40:41 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-04-18 08:40:41 +0000 |
commit | 5db76a3b2e31adda34c912ddafbdac043725cb4a (patch) | |
tree | a3aa5454e5bf85e288f4927f5eaaf0fbdf8f8001 | |
parent | 77d08731815fc1425f82f1226f5fb46813cc30db (diff) | |
parent | a6ddeb54dcdce073bf4cb92110ab9f462945c2ff (diff) | |
download | gitlab-ce-5db76a3b2e31adda34c912ddafbdac043725cb4a.tar.gz |
Merge branch '40402-time-estimate-system-notes-can-be-confusing' into 'master'
Resolve "Time estimate system notes can be confusing"
Closes #40402
See merge request gitlab-org/gitlab-ce!18326
-rw-r--r-- | app/services/system_note_service.rb | 2 | ||||
-rw-r--r-- | changelogs/unreleased/40402-time-estimate-system-notes-can-be-confusing.yml | 5 | ||||
-rw-r--r-- | spec/services/system_note_service_spec.rb | 8 |
3 files changed, 13 insertions, 2 deletions
diff --git a/app/services/system_note_service.rb b/app/services/system_note_service.rb index 00bf5434b7f..958ef065012 100644 --- a/app/services/system_note_service.rb +++ b/app/services/system_note_service.rb @@ -159,7 +159,7 @@ module SystemNoteService body = if noteable.time_estimate == 0 "removed time estimate" else - "changed time estimate to #{parsed_time}" + "changed time estimate to #{parsed_time}," end create_note(NoteSummary.new(noteable, project, author, body, action: 'time_tracking')) diff --git a/changelogs/unreleased/40402-time-estimate-system-notes-can-be-confusing.yml b/changelogs/unreleased/40402-time-estimate-system-notes-can-be-confusing.yml new file mode 100644 index 00000000000..e47577f9058 --- /dev/null +++ b/changelogs/unreleased/40402-time-estimate-system-notes-can-be-confusing.yml @@ -0,0 +1,5 @@ +--- +title: Add a comma to the time estimate system notes +merge_request: 18326 +author: +type: changed diff --git a/spec/services/system_note_service_spec.rb b/spec/services/system_note_service_spec.rb index e28b0ea5cf2..893804f1470 100644 --- a/spec/services/system_note_service_spec.rb +++ b/spec/services/system_note_service_spec.rb @@ -909,7 +909,13 @@ describe SystemNoteService do it 'sets the note text' do noteable.update_attribute(:time_estimate, 277200) - expect(subject.note).to eq "changed time estimate to 1w 4d 5h" + expect(subject.note).to eq "changed time estimate to 1w 4d 5h," + end + + it 'appends a comma to separate the note from the update_at time' do + noteable.update_attribute(:time_estimate, 277200) + + expect(subject.note).to end_with(',') end end |