thesamim / TickTickSync

GNU General Public License v3.0
99 stars 2 forks source link

Duplicate Tasks #73

Closed LemurTech closed 4 months ago

LemurTech commented 4 months ago

I'm having persistent problems with duplicated tasks on the master "project" list in Obsidian. These are not duplicated in TickTick, as their ID appears to be exactly the same. When I remove them manually from the list, they seem to just reappear. The Tasks plugin does not seem to have any 'dedupe' capabilities. Note that the lack of %% comment delimiters in the screenshot is due to css removing them.

image

thesamim commented 4 months ago

Thanks for raising this.

I actually started seeing that on my set up and am dealing with the dedupe logic as we speak. Will be in next release.

LemurTech commented 3 months ago

I'm very excited to see this fix! That said, I don't see any changes retroactively applied. Should I just manually remove the duplicates? Thank you!

thesamim commented 3 months ago

Yes please.

Automatic removal would have been too risky to implement.

BUT: if you see duplicates again, PLEASE let me know ASAP.

LemurTech commented 3 months ago

Understood and will do. Cheers!

LemurTech commented 3 months ago

I'm still seeing duplicates. But now it occurs to me that the reason may be because of Obsidian Sync. I'm going to try excluding the TickTick tasks default folder.

thesamim commented 3 months ago

Please keep me posted.

LemurTech commented 3 months ago

If I were to delete all tasks from the default project file, would they be downloaded again from TickTick on next sync? Or would the sync try to delete them from TickTick?

thesamim commented 3 months ago

If I were to delete all tasks from the default project file, would they be downloaded again from TickTick on next sync? Or would the sync try to delete them from TickTick?

They would be deleted from TickTick.

If you want to start over, and are feeling pretty brave :) :

  1. Close Obsidian everywhere.
  2. Back up the default project file.
  3. Back up <your vault root>\.obsidian\plugins\tickticksync\data.json
  4. edit <your vault root>\.obsidian\plugins\tickticksync\data.json
  5. Find the "tasks": entry and make it "tasks": [] (ie: delete all the task entries)
  6. Find the "fileMetadata": entry and make it "fileMetadata": {} (ie: delete all the fileMetaData entries)
  7. Verify that the JSON parses correctly after changes (I suggest going to https://jsonlint.com and pasting the content there to validate it.)
  8. delete the default project file
  9. Restart Obsidian in one place
  10. Sync again.

That should reset your default project file to look like your TickTick...

LemurTech commented 3 months ago

That actually worked very well! Thank you for the clear process!

thesamim commented 3 months ago

Welcome.

Please keep me posted...