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

[BUG] Folder writing goal lost after update #27

Open
FeralFlora opened this issue Sep 10, 2023 · 18 comments
Open

[BUG] Folder writing goal lost after update #27

FeralFlora opened this issue Sep 10, 2023 · 18 comments
Assignees
Labels
bug Something isn't working

Comments

@FeralFlora
Copy link

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

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

@lynchjames lynchjames self-assigned this Sep 10, 2023
@lynchjames lynchjames added the bug Something isn't working label Sep 10, 2023
@FeralFlora
Copy link
Author

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

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

@FeralFlora
Copy link
Author

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

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

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

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

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

@FeralFlora
Copy link
Author

@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 lynchjames reopened this Sep 10, 2023
@lynchjames
Copy link
Owner

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

@FeralFlora
Copy link
Author

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

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

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

@lynchjames
Copy link
Owner

#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
Copy link
Author

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

FeralFlora commented Nov 21, 2023

@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
Copy link
Contributor

danieltomasz commented Nov 21, 2023

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants