Commit 1df5d607 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Fix todo creation on epics when toggling tasks

When toggling task list items, todo creation should be skipped. This
makes it consistent with issues and merge requests.
parent b06d7cac
......@@ -27,7 +27,7 @@ module EE
end
def update_epic(epic, current_user, skip_users = [])
create_mention_todos(nil, epic, current_user, nil, skip_users)
update_issuable(epic, current_user, skip_users)
end
# When a merge train is aborted for some reason, we should:
......
---
title: Fix todo creation on epics when toggling tasks
merge_request: 50827
author:
type: fixed
......@@ -168,6 +168,16 @@ RSpec.describe TodoService do
include_examples 'todos creation'
end
context 'when toggling task list items' do
before do
epic.update(description: "- [x] Task 1\n- [x] Task 2 FYI: #{mentions}")
end
it 'does not create todos' do
expect { execute }.not_to change { Todo.count }
end
end
end
describe '#new_note' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment