obsidian-todoist-plugin icon indicating copy to clipboard operation
obsidian-todoist-plugin copied to clipboard

"Show: labels" doesn't work

Open derekantrican opened this issue 1 year ago • 2 comments

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):

  • Plugin Version 1.13.0
  • Obsidian Version 1.15.12

derekantrican avatar Apr 16 '24 16:04 derekantrican

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:

  • gives you fine-grained control
  • matches the behaviour once the options are removed

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

jamiebrynes7 avatar May 06 '24 14:05 jamiebrynes7

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: 1.

  • 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)

derekantrican avatar May 07 '24 03:05 derekantrican

To be clear, the global settings are going to be removed in the next release - so this behaviour will go away. In the interim, I will not be changing the interaction of the global & query-specific configuration.

jamiebrynes7 avatar Jul 19 '24 15:07 jamiebrynes7