c6p / logseq-habit-tracker

Habit tracker for Logseq
MIT License
95 stars 5 forks source link

Habits not tracked when inserted from template #11

Closed aurnik closed 2 years ago

aurnik commented 2 years ago

I'm not sure what the exact issue is, but I have a template for my daily journal that looks like this

- #habit
    - DONE lift
    - DONE cardio

The Habit Pattern I'm using is ^DONE (?<habit>.*)$ Those habits don't get tracked, but if I just manually make another block underneath like this

- #habit
    - DONE review calendar

That one does get tracked. Any idea what's going on?

c6p commented 2 years ago

Properties following a #habit weren't matching. It should be fixed with v0.3.4.

Hopefully, I didn't introduce another bug. 😄

aurnik commented 2 years ago

@c6p Hey thanks for getting on this so quickly. I updated to v0.3.4 and the bug was still happening to me but I think it's actually a problem with Logseq, not this plugin.

If anyone experiences this bug, try these: 1) Re-index 2) If that doesn't work, just delete your old template block, and then recreate the exact same thing.

It's working for me again, thanks Can

Edit: You might have to re-index several times. I don't know if it's an issue with Logseq or this plugin but for whatever reason making changes to templates leads to unpredictable behavior with this plugin.