pyrochlore / obsidian-tracker

A plugin tracks occurrences and numbers in your notes
MIT License
1.37k stars 229 forks source link

maxStreak() doesn't work with frontmatter #299

Closed JulianVJacobs closed 10 months ago

JulianVJacobs commented 10 months ago

When doing a summary to find the maxStreak(), it seems to count the existence of the variable and not the value. I have tried different types: a checkbox, text with 1 and 0, number with 1 and 0. it always counts the instances even if they're all false or if they're a mixture of true and false. the sum() does work as expected, however.

Expected Behavior

It's expected to find the longest streak of true values.

Current Behavior

It seems to count the pages that have the searchTarget, whether they're true or false.

Steps to Reproduce (for bugs)

  1. Create a summary type report
  2. Set it to report the maxStreak() of a checkbox type
  3. Create a set of broken streaks
lazyguru commented 10 months ago

@JulianVJacobs could you please provide an example file or two along with the dataview query?

JulianVJacobs commented 10 months ago

2024-01-01.md 2024-01-02.md 2024-01-03.md 2024-01-04.md 2024-01-05.md 2024-01-06.md 2024-01-07.md 2024-01-08.md 2024-01-09.md 2024-01-10.md 2024-01-11.md tracker.md

None of the checkboxes are set to true, but somehow the streak is 11 days(s)

JulianVJacobs commented 10 months ago

image

This is how the tracker looks for me regardless of the truth value of the checkboxes

lazyguru commented 10 months ago

1.13.2 has been released and this should now be fixed