thesamim / TickTickSync

GNU General Public License v3.0
159 stars 12 forks source link

Writing to Incorrect File #139

Closed chrisfurlong-aiwyn closed 5 months ago

chrisfurlong-aiwyn commented 5 months ago

Describe the bug At one point in time, creating a task in Ticktick would write the task to the correct MD file in Obsidian. However, whenever I create a task now, it writes it to an arbitrary daily note and appends it to the bottom-most task.

I removed the file it was selecting, and it simply went to another. I did it again, and it picked a new file from a new directory. The MD file it should be writing to exists, and I've switched the "task directory" for TickTickSync, and created a new file, but to no avail. It's just not respected.

To Reproduce I have sync enabled across multiple devices but I disabled it and I could still reproduce it. It still seems odd since it's effectively a hard coded file and it shouldn't be allowed to write a new task to a file that wasn't specified (obviously updates may be needed, but imo I don't see a need to insert)

Expected behavior It should write the task to the same work.md file.

**Set up questions:

Yes, Obsidian sync

Yes

Yes

No but I did at one point

No

No

Desktop (please complete the following information):

Chrome / Windows

Smartphone (please complete the following information):

Android

Additional context Add any other context about the problem here.

thesamim commented 5 months ago

@chrisfurlong-aiwyn : Is this affecting Inbox tasks, or tasks in a particular list/folder? For the file that the tasks end up in: did you set that file up a default project for that file?

From your data.json (<your vault root>\.obsidian\plugins\tickticksync\data.json), please let me know what entries you have for:

defaultProjectName
TickTickTasksFilePath
inboxName
inboxID (just let me know if you have one, don't paste here.)
SyncProject
SyncTag
fileMetadata (note: that's all the file names that TickTickSync knows about. 
         If there's anything sensitive about the naming of those files, please redact. 
        And if you can let me know if you see the file that the tasks are ending up in, 
        and if has a defaultProjectId associated that would be helpful (and the defaultProjectId 
        will match up with one of your project names that would be useful information as well.))
chrisfurlong-aiwyn commented 5 months ago

Sorry, I missed this - I actually reinstalled the plugin and everything started working again.

It was going into random files though that were not mentioned anywhere in settings.

thesamim commented 5 months ago

thanks for the update. It's still a concern though. If it happens again, please let me know what's in the fileMetaData entry.