logseq-habit-tracker icon indicating copy to clipboard operation
logseq-habit-tracker copied to clipboard

TODO habits are being counted as "green"

Open mikob opened this issue 3 years ago • 2 comments
trafficstars

First of all, really like how user-friendly your plugin is, and love the visualization! I haven't been able to use it successfully, because it has always marked my TODO items as completed. Haven't done anything special in the settings.

Here are my settings: image

All the days that are green there are actually still in TODO and not marked DONE (so they shouldn't be green in the habit tracker): image

The days that are red are actually a separate issue where LogSeq isn't putting my journal template in some days that I manually create the journal page for. You can ignore that.

I'm on the latest version of your plugin and LogSeq 0.8.0.

mikob avatar Aug 18 '22 16:08 mikob

Thanks, @mikob.

It seems the ignore pattern does not match entries where time is tracked (i.e. 0s on the right), due to newline characters. The plugin uses :block/content to match habits, you can observe LOGBOOK inserted after \n to track time by clicking (Dev) Show block data if developer mode has been enabled.

In the meantime, you can change your ignorePattern to TODO (.|\n)*.

I'll provide either a fix or a more sensible default for the ignore pattern in the next version.

Cheers

c6p avatar Aug 19 '22 07:08 c6p

@c6p nice catch, yes that fixes it!

mikob avatar Aug 19 '22 14:08 mikob