obsidian-tasks
obsidian-tasks copied to clipboard
cant UNDO "mark task as completed" in query display
Expected Behavior
I have a task that is displayed on a page in a query statement. I mark the task as DONE, The task disappears. I should be able to undo this action (^Z or Edit > Undo) to mark the task as not done and get the task back in my query view.
Current behaviour
If I mark the task done, the task dissapears from the query diplay. When I press Command-Z (on Mac) the action isnt undone, the task stays DONE.
Steps to reproduce
-
Create a task in a note
- [] Test task 📅 2022-08-12
(Use today's date) -
Display this task in a second note
```tasks
not done
due today ```
-
Check the task as completed in the second note page
-
UNDO the action (^Z / CMD Z)
-
Watch as the action isn't undone
Which Operating Systems are you using?
- [ ] Android
- [ ] iPhone/iPad
- [ ] Linux
- [X] macOS
- [ ] Windows
Obsidian Version
0.15.9
Tasks Plugin Version
1.11.1
Checks
- [X] I have tried it with all other plugins disabled and the error still occurs
I do agree that this would be nice, but I've just tested in a vault with Tasks turned off, and the built-in task completion mechanism has the same behaviour.
- Create a task
- Switch to reading mode
- Toggle the task
- Hit shortcut for Undo, and task does not get re-opened
However, switching back to editing mode makes the Undo work:
- Create a task
- Switch to reading mode
- Toggle the task
- Switch back to Source or Live Preview mode
- Hit shortcut for Undo, and task does get re-opened
I'll leave this as an Issue, as I agree it would be a nice improvement, and it does feel like a bug, from a user perspective.
But whilst the behaviour is the same as Obsidian, we are unlikely to be able to fix it.
thanks for the extra info @claremacrae I have created an obsidian bug report here https://forum.obsidian.md/t/cant-undo-mark-task-as-completed-in-reading-view/41776
Hi @garethfr - super, thank you for the update.
@claremacrae If the query is in a different file from the task, I suspect the undo behavior is even more complicated. Do you know?
Oh ouch, the answer on the forum bug is:
There is no undo in reading mode
Since task query results are essentially displayed "in reading mode" (@garethfr if this doesn't make sense please let me know and I can explain further), this may mean that the internals of Obsidian may make this complicated to fix.
Interesting @AnnaKornfeldSimpson. I know nothing of the internals of obsidian, but logically, even if the task is displayed in reading mode, there is definitely some editing going on, as the note is updated. Anyway as it seems to be an obsidian issue not noted plug-in I guess we have to wait and see if they reply
@claremacrae If the query is in a different file from the task, I suspect the undo behavior is even more complicated. Do you know?
No, sorry I don't.