diff options
author | Jose Ivan Vargas <jvargas@gitlab.com> | 2018-04-11 16:21:36 -0500 |
---|---|---|
committer | Jose Ivan Vargas <jvargas@gitlab.com> | 2018-04-16 10:23:14 -0500 |
commit | a6ddeb54dcdce073bf4cb92110ab9f462945c2ff (patch) | |
tree | 873a5dbcfdc2eb426def2e08a52b60ee816c4350 | |
parent | 3a1b961dfaec131cad7472fea202d4092c1880d6 (diff) | |
download | gitlab-ce-a6ddeb54dcdce073bf4cb92110ab9f462945c2ff.tar.gz |
Add a comma to the time system notes estimates
-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 |