jamiebrynes7 / obsidian-todoist-plugin

Materialize Todoist tasks in Obsidian notes
https://jamiebrynes7.github.io/obsidian-todoist-plugin/
MIT License
872 stars 66 forks source link

"Show: labels" doesn't work #318

Open derekantrican opened 2 months ago

derekantrican commented 2 months ago

Describe the bug Putting "Show: labels" in a query doesn't work

To Reproduce Steps to reproduce the behavior:

  1. Ensure the setting "Enable labels" is turned off (especially since this will be deprecated anyway)
  2. Insert the following YAML query (note: filter is not important - as long as the shown tasks have labels):
name: "My Tasks"
filter: "today | overdue"
show:  
    - labels

Note: the above query was created referencing the documentation

  1. Tasks are shown without labels

Expected behavior Tasks should respect the "show" part of the query, but instead seem to be only respecting the plugin settings (which will be deprecated soon)

Screenshots Obsidian_SxXnxLIVYk

Desktop (please complete the following information):

jamiebrynes7 commented 1 month ago

This is actually the intended behaviour (if slightly unintuitive). The settings option is "global" and will take precedence over the local setting.

If you are using the show option in queries, I recommend leaving the all the global options turned on since this:

In any case, the global options are going to be removed in the next release, so this will cease to be a problem shortly

derekantrican commented 1 month ago

Ok, then I guess the problem description should be rephrased: it does not appear to be currently possible with this plugin to show two or more lists of todoist tasks where some lists show labels and some don't. That is to say: the setting "Enable labels" in the plugin settings is the only control for whether labels are shown and changing the query "Show: labels" (adding it or removing it) doesn't do anything.

For instance:

    • Plugin setting "Enable labels" turned ON
    • Query contains show: labels (yaml formatted, of course)
    • Result: labels shown (expected)
    • Plugin setting "Enable labels" turned ON
    • Query DOES NOT CONTAIN show: labels
    • Result: labels are still shown (even though query did not "ask" for it) (not expected)
    • Plugin setting "Enable labels" turned OFF
    • Query contains show: labels (yaml formatted, of course)
    • Result: labels NOT shown (not expected)
    • Plugin setting "Enable labels" turned OFF
    • Query DOES NOT CONTAIN show: labels
    • Result: labels NOT shown (expected)