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

Boolean "true' doesn't work the way "1" did before Properties happened #247

Closed
sh4d0wl3ss opened this issue Sep 24, 2023 · 11 comments
Closed

Comments

@sh4d0wl3ss
Copy link

HI Folks, I have a calendar habit tracker that worked swimmingly before the change to properties. It seems that the property checkbox results in a "true" in markdown where before it was a "1". Sure enough if I manually change a note with a checked property in the front matter that had been "true" to "1" that note's checkbox property appears in my monthly calendar. How can I rewrite the code below to work with "true" instead of "1" for properties that are checkboxes?

searchType: frontmatter
searchTarget: hands=true, eyes=true, walk=true, workout=true
datasetName: Hands, Eyes, Walk, Workout
folder: 2023
month:
mode: annotation
startWeekOn: 'Mon'
color: green
headerMonthColor: orange
dimNotInMonth: false
annotation: 👐,👀,🚶‍♂,💪
showAnnotationOfAllTargets: true

Thanks

@lazyguru
Copy link
Collaborator

There is an open PR that solves this #177. Additionally, my fork has almost every open PR merged on it and I did a release that you can manually install: https://github.com/lazyguru/obsidian-tracker/releases/tag/v1.11.0

@sh4d0wl3ss
Copy link
Author

Still no luck. I copied the files in the #177
styles.css
main.js
manifest.json
to the plugin folder and that just turned off the plugin, so I had to reinstall it. No change in regard to treating "true" in the frontmatter to the way "1" was treated before. Here's my code that worked before Properties were added. Is there something better I should use?

searchType: frontmatter
searchTarget: hands, eyes, walk, workout
datasetName: Hands, Eyes, Walk, Workout
folder: 2023
month:
	mode: annotation
	startWeekOn: 'Mon'
	color: green
	headerMonthColor: orange
	dimNotInMonth: false
	annotation: 👐,👀,🚶‍♂,💪
	showAnnotationOfAllTargets: true

Each of the targets is either "true" or blank, per the way checkboxes function now.
Thanks.

@dml0sc
Copy link

dml0sc commented Oct 7, 2023

I tried to install v1.11.0 and I continue having the same problem with parsing booleans from the frontmatter.

@lazyguru
Copy link
Collaborator

lazyguru commented Oct 9, 2023

@sh4d0wl3ss did you check in the plugin list to see if you could turn it back on? It might have disabled as mine is a slightly different package name due to coming from my fork)

@lazyguru
Copy link
Collaborator

lazyguru commented Oct 9, 2023

@dml0sc can you provide more information? (An example of what the frontmatter looks like and how your data query is?). I've been using the new UI for a while now and it works great (I even have multiple trackers in the same query)

@sh4d0wl3ss
Copy link
Author

Hi Yes. Turned it on and it works as before. The code I pasted above will work if the target is 1 but not if it is true.

@lazyguru
Copy link
Collaborator

lazyguru commented Oct 9, 2023

Here is a test vault using your settings and the v1.11.0 release from my fork (and the dataview plugin)
Tracker Test.zip
Screen Shot 2023-10-09 at 5 18 34 PM

@lazyguru
Copy link
Collaborator

lazyguru commented Oct 9, 2023

Screen Shot 2023-10-09 at 5 19 53 PM
Screen Shot 2023-10-09 at 5 19 48 PM

@lazyguru
Copy link
Collaborator

lazyguru commented Oct 9, 2023

Screen Shot 2023-10-09 at 5 20 34 PM

@sh4d0wl3ss
Copy link
Author

Thanks. I see that though I'd put in your new files for 1.11 without having disabled and then reenabled. Though it now works the version reported in the Community plugin browser is still 1.10.9. That just confused me that it didn't take the first time.

@sh4d0wl3ss
Copy link
Author

That solves it for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants