obsidian-tasks-group / obsidian-tasks

Task management for the Obsidian knowledge base.
https://publish.obsidian.md/tasks/
MIT License
2.37k stars 224 forks source link

Repeated tasks are being addedβ€œ 🏁 After the 'delete' field, the task status cannot be reset #3043

Open GLISHANG opened 3 weeks ago

GLISHANG commented 3 weeks ago

Please check that this issue hasn't been reported before.

Expected Behavior

test1

test2

After the task is completed, the newly created task should be in an unfinished state.

Current behaviour

test1

test2

After the task is completed, the newly created task is in a completed state.

Steps to reproduce

Note from @claremacrae: the steps below are not relevant to this issue. They may relate to https://github.com/obsidian-tasks-group/obsidian-tasks/issues/3041.

1. Launch Obsidian Sandbox Vault 2. Enable Community Plugins 3. Install Tasks 4. Change "minimum match length for auto-suggest" to "1" 5. Restart Obsidian 6. In a new note, create a task with any title, type "du" and press enter to insert due date emoji from auto-suggest. Notice that the autosuggest box remains active.

Which Operating Systems are you using?

Obsidian Version

1.6.7

Tasks Plugin Version

7.9.0

Checks

Possible solution

No response

claremacrae commented 3 weeks ago

Thanks, however there isn't enough information to reproduce the problem.

  1. Please edit the description and include a screenshot of the problem result.
  2. In the steps to complete, please edit them to say how exactly you are completing the task.
claremacrae commented 3 weeks ago

Steps to reproduce

  1. Launch Obsidian Sandbox Vault
  2. Enable Community Plugins
  3. Install Tasks
  4. Change "minimum match length for auto-suggest" to "1"
  5. Restart Obsidian
  6. In a new note, create a task with any title, type "du" and press enter to insert due date emoji from auto-suggest. Notice that the autosuggest box remains active.

The above is nothing to do with the 🏁 delete option, and so will not be tracked here. Each issue needs to focus on one problem, please.

However, It looks similar to the following, which I have only been able to reproduce since updating to Obsidian 1.7.0.

Obsidian Version

1.6.7

claremacrae commented 3 weeks ago

I suspect that the cause of this issue is the following in the Tasks plugin Live Preview code:

https://github.com/obsidian-tasks-group/obsidian-tasks/blob/33efdee4aa448ce161f24971ed591c8252638c6e/src/Obsidian/LivePreviewExtension.ts#L93-L104

It probably needs to detect if the completed task has been discarded, and if so, not apply the workaround...