diff options
author | Jared Deckard <jared.deckard@gmail.com> | 2017-06-08 20:56:41 +0300 |
---|---|---|
committer | Jared Deckard <jared.deckard@gmail.com> | 2017-06-12 19:51:19 +0300 |
commit | 2e7db162fa1e1d375688c8eb66fabac2f67e8eb3 (patch) | |
tree | c96e6d731ad82bbcbc0b6ac204f68fbbf458fec7 /app/services/issuable_base_service.rb | |
parent | 9cf6adc111181d0ddc299d7a56e4dbd615607717 (diff) |
Only add a description change note when no tasks are updated
Diffstat (limited to 'app/services/issuable_base_service.rb')
-rw-r--r-- | app/services/issuable_base_service.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/app/services/issuable_base_service.rb b/app/services/issuable_base_service.rb index e77a3e3eac1..a65d6e11c47 100644 --- a/app/services/issuable_base_service.rb +++ b/app/services/issuable_base_service.rb @@ -313,11 +313,13 @@ class IssuableBaseService < BaseService end if issuable.previous_changes.include?('description') - create_description_change_note(issuable) - end - - if issuable.previous_changes.include?('description') && issuable.tasks? - create_task_status_note(issuable) + if issuable.tasks? && issuable.updated_tasks.any? + create_task_status_note(issuable) + else + # TODO: Show this note if non-task content was modified. + # https://gitlab.com/gitlab-org/gitlab-ce/issues/33577 + create_description_change_note(issuable) + end end if issuable.previous_changes.include?('time_estimate') |