Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
4 of 11 tasks
GLISHANG opened this issue Aug 21, 2024 · 7 comments
Labels
display: live preview Issues referring to Obsidian's Live Preview mode priority: high A high priority/important request type: bug Something isn't working

Comments

@GLISHANG
Copy link

GLISHANG commented Aug 21, 2024

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

  • I searched previous Bug Reports didn't find any similar reports.

Expected Behavior

test1

  • Delete my completed instance, leave my next instance πŸ” every day 🏁 delete ⏳ 2024-08-21

test2

  • Delete my completed instance, leave my next instance πŸ” every day 🏁 delete ⏳ 2024-08-22
  • [ ]

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

Current behaviour

test1

  • Delete my completed instance, leave my next instance πŸ” every day 🏁 delete ⏳ 2024-08-21

test2

  • Delete my completed instance, leave my next instance πŸ” every day 🏁 delete ⏳ 2024-08-22
  • [ ]

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 #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.

Note from @claremacrae: I wrote up the reproduction steps in #3043 (comment)

Which Operating Systems are you using?

  • Android
  • iPhone/iPad
  • Linux
  • macOS
  • Windows

Obsidian Version

1.6.7

Tasks Plugin Version

7.9.0

Checks

  • I have tried it with all other plugins disabled and the error still occurs

Possible solution

No response

@GLISHANG GLISHANG added the type: bug Something isn't working label Aug 21, 2024
@claremacrae
Copy link
Collaborator

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.
  • In Tasks plugin search results?
  • Clicking on the task in Live Preview?
  • Clicking on the task in Reading Mode?

@claremacrae claremacrae added the question Further information is requested label Aug 21, 2024
@claremacrae
Copy link
Collaborator

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
Copy link
Collaborator

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

// Dirty workaround.
// While the code in this method properly updates the `checked` state
// of the target checkbox, some Obsidian internals revert the state.
// This means that the checkbox would remain in its original `checked`
// state (`true` or `false`), even though the underlying document
// updates correctly.
// As a "fix", we set the checkbox's `checked` state *again* after a
// timeout to revert Obsidian's wrongful reversal.
const desiredCheckedStatus = target.checked;
setTimeout(() => {
target.checked = desiredCheckedStatus;
}, 1);

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

@claremacrae claremacrae added the display: live preview Issues referring to Obsidian's Live Preview mode label Sep 3, 2024
@claremacrae claremacrae added priority: high A high priority/important request and removed question Further information is requested labels Sep 13, 2024
@GLISHANG
Copy link
Author

Finally got the update, thank you very much. But I found some new problems.
In live preview mode, the task status can be reset normally in reading view, but it still does not work in editing view.

@claremacrae
Copy link
Collaborator

I am struggling to know how to explain to you what we need, but I will try one last time:

  • β€œ it still does not work in editing view.”: β€œdoes not work” is useless information. We need to know exactly what happened.
  • If you want someone to spend time helping you, we need a clear precise list steps to exactly and reliably reproduce what you did when the problem happened.
  • One problem per Issue: create new issues for different topics

@materemias
Copy link

@claremacrae I think I can show a quick reproduction of the issue.
I am using Obsidian v1.7.3 with Tasks plugin v7.10.2

In edit mode/live preview if I complete a recurring task that was set to delete the original one on completion, the newly created task appears to be completed (actually it is still - [ ] in the background)
obstlp

If I complete a similar tasks in reading mode, the newly created tasks is displayed to be in state todo properly.
obstrm

I hope this helps

@claremacrae
Copy link
Collaborator

Thanks @materemias - I really appreciate your taking the time.

For future reference, we can't do anything with just screenshots...

So here is your video converted to a set of reproduction steps:

  1. Paste the following line in to a Markdown note in Obsidian, with Tasks plugin v7.10.2 enabled:

    - [ ] #task Do stuff πŸ” every day 🏁 delete πŸ“… 2024-10-04
    
  2. Switch to Reading Mode

    Appearance:

    image
  3. Complete the task.

    New markdown is correct - there is only one task, and its date has been increased by 1:

    - [ ] #task Do stuff πŸ” every day 🏁 delete πŸ“… 2024-10-05
    

    And the new rendered task is correct, as in, it is not checked:

    image
  4. Switch to Live Preview

    Appearance:

    image

  5. Complete the task:

    New markdown is correct - there is only one task, and its date has been increased by 1:

    - [ ] #task Do stuff πŸ” every day 🏁 delete πŸ“… 2024-10-06
    

    New appearance is incorrect, in that the checkbox wrongly remains checked:

    image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
display: live preview Issues referring to Obsidian's Live Preview mode priority: high A high priority/important request type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants