Issuable descriptions: Mentions added at the same time as checkboxes are edited do not generate Todos

Summary

For issuables (a Merge Request, Issue or Epic) a Todo is not created for a description update if a checkbox was edited at the same time.

The issue is due to the application skipping creating Todos if it detects that we are #toggling_tasks?.

Steps to reproduce

  1. Create an issue with a description: [ ] My todo
  2. Edit the issue, and, within the same edit, mark the checkbox as checked (markdown: [x] My todo) and @mention a user
  3. No Todo is created ~bug
  4. Edit the issue, remove the mention
  5. Edit the issue, just add the mention (and do not edit the checkbox)
  6. Todo is created

What is the current bug behavior?

A Todo is not created for a @mention if a checkbox is edited at the same time.

What is the expected correct behavior?

A Todo should be created.

Notes

We'll need to make sure that the fix doesn't cause toggling Todos with the UI to recreate old @mentions.

Edited by Luke Duncalfe