lynchjames / obsidian-writing-goals

Set yourself dynamic writing goals for notes and folders to help you hit your long form writing targets with Obsidian.
MIT License
74 stars 3 forks source link

[BUG] Folder writing goal lost after update #27

Open FeralFlora opened 1 year ago

FeralFlora commented 1 year ago

I had a single folder writing goal, but it is now gone. In data.json, folderGoals is empty:

"folderGoals": [],

But the goal history is not lost in goal-history.json.

Re-adding the goal does not seem to connect the goal to the existing goal-history data for the folder.

lynchjames commented 1 year ago

Did you rename or move the folder or rename/move a parent/grandparent/etc. of that folder?

FeralFlora commented 1 year ago

Did you rename or move the folder or rename/move a parent/grandparent/etc. of that folder?

I am pretty sure I didn't rename the folder in the timeframe where this occurred.

lynchjames commented 1 year ago

Does the path in data.json once you've re-added the goal for the folder match the entry in goal-history.json?

FeralFlora commented 1 year ago

Does the path in data.json once you've re-added the goal for the folder match the entry in goal-history.json?

Yes, in goal-history.json its like this: "04 - 🔥 Projects/Master's thesis/Manuscript": [ and in data.json it's like this "path": "04 - 🔥 Projects/Master's thesis/Manuscript",.

In the history, there are dates from 05 to 10, but the bar chart is not there. Btw, not much lost here, I've mostly been testing this out.

Sidenote: Can Writing goals count changes to other file formats like .qmd? Pretty sure that it was working at some point, but not now. Also, when you start a writing goal on a folder with existing text, is that text counted towards the goal, or only text written following the fact?

lynchjames commented 1 year ago

I can't recreate your issue with that folder structure.

Could you check the "Display daily goal stats" (this setting name should now be updated to remove the daily part)? The value for that may have reverted to false.

lynchjames commented 1 year ago

For #24 I added an extra check on .md extension to allow word counts on files. I can include .qmd as well.

On your sidenote, word counts for existing notes under a folder will count to the overall goal when you add a goal but goal progress will be recorded for new words written from the date you added the goal.

FeralFlora commented 1 year ago

Could you check the "Display daily goal stats" (this setting name should now be updated to remove the daily part)? The value for that may have reverted to false.

Doh! It seems that setting reverted along with the loss of the folder goal. With this toggled on, I now see the history again after I added the goal again. However, the overall goal does not reflect the existing text in the folder, but that's because it's a .qmd file.

So yes, I would love if you added support for Quarto files, and I think some people would probably also appreciate support for .rmd files.

lynchjames commented 1 year ago

Thanks. I'll close this and add an FR for a setting to include other file types for word counts.

FeralFlora commented 1 year ago

@lynchjames Well, the bug was the loss of the goal (and other settings), so in that sense, it's not been resolved, although I could reconnect after resetting the goal.

lynchjames commented 1 year ago

True! Re-opened. Was this when updating to 0.8.0 and do you remember the version you updated from?

FeralFlora commented 1 year ago

True! Re-opened. Was this when updating to 0.8.0 and do you remember the version you updated from?

No, but BRAT does. Here's that last two entries for Writing goals in the log:

[[2023-09-10]] 20:45 User writing-goals Plugin has been updated from version 0.7.8 to 0.8.0. Release Info [[2023-09-09]] 15:49 User writing-goals Plugin has been updated from version 0.7.7 to 0.7.8. Release Info

I only noticed today, so it probably happened with the last update.

FeralFlora commented 1 year ago

Okay, now I updated again to 0.8.1 and all writing goal views are blank. However, from the context menu, I can click update goal and see that the goal is as I set it. Also, the file explorer goal indicator is not there anymore. However, reindexing with qmd brought back the view (but I don't think the qmd part was critical, just reindexing). The previous situation persisted several restarts until I reindexed from the settings.

danieltomasz commented 1 year ago

@FeralFlora I created issue regarding the blank goals graphs https://github.com/lynchjames/obsidian-writing-goals/issues

lynchjames commented 1 year ago

29 (goals and stats blank on plugin update) should be resolved in 0.8.2.

I'll leave this open to see if the settings reset issue reoccurs. I can't replicate the issue and I don't think there were any changes in 0.7.8 - 0.8.0 that would have caused it.

There were some significant changes to file structure in 28b74a3 that may have caused the issue but that was back in 0.7.5.

FeralFlora commented 1 year ago

I'll leave this open to see if the settings reset issue reoccurs.

Thanks, I'll report back if I run into anything similar!

FeralFlora commented 11 months ago

@lynchjames I lost the folder goal again now after updating Obsidian to insider build 1.5.0. I also lost settings like Display goal stats, and additional file types.

Here's a screenshot of data.json:

image

(I added qmd back before taking the screenshot, it was gone before).

As you can see, the goal leaf is still there, but no folder goals. The goal leaf is blank:

image

Goal-history.json contains history up until yesterday, which is when I updated.

danieltomasz commented 11 months ago

hi @FeralFlora I also updated to 1.5 but my folder goals stayed the same, nothing changed (I have md files in my project, only my index file which is excluded is qmd) Could you maybe reindex file types ( and re-add qmd if you use qmd files), I remember similar behavior after updates related to including files with other than md extension

FeralFlora commented 11 months ago

Hi @danieltomasz!

Yeah, I'm not sure what exactly caused it. I've also been experimenting with disabling some plugins the last days and starting in safe mode to see how it affected Obsidian's performance. But of course, one should expect that the plugin would persist its data even though it was disabled.

Could you maybe reindex file types ( and re-add qmd if you use qmd files), I remember similar behavior after updates related to including files with other than md extension

I did that, but it didn't bring back the folder goal. Going to try re-adding the goal from the history again.