filter by YAML tag #232
Replies: 17 comments 15 replies
-
Hey, thanks for the idea. I haven’t really looked into tags/YAML frontmatter, yet. This is probably not too easy to do with the current code base, as this would mean all tasks need to track all tags from their file 🤔 |
Beta Was this translation helpful? Give feedback.
-
Need this to exclude tasks in projects with |
Beta Was this translation helpful? Give feedback.
-
Suggestion/workaroundA workaround that involves fewer edits is to search on I have this kind of thing in my markdown... I chose to use the word "Deferred" in headings to treat all tasks in that section as deferred... ## Home Deferred
- [ ] ..
- [ ] ..
## House Deferred
- [ ] ..
- [ ] .. Then in my queries, if I want to exclude deferred tasks I have:
And to include deferred tasks:
So if you have whole files with Suspended or Not Started YAML tags, you could add a single highest-level heading at the top of the file that repeats the Tag name, and then you could use This would be quite a lot easier than editing every single task, I feel. Extra ideasIt also has slightly finer granularity, so if I want to activate some deferred tasks, I only need to move them to a different section in a file, rather than a different file. Where I have a file with all tasks for a particular topic, I tend to use this kind of heading pattern: # Tasks - Us - Entertainment
## Entertainment
- [ ] ...
## Entertainment Routine
- [ ] ...
## Entertainment Deferred
- [ ] ... It means that only the |
Beta Was this translation helpful? Give feedback.
-
I've shared the above in the new |
Beta Was this translation helpful? Give feedback.
-
I came here whilst reviewing #716. Now that we have the Another example motivation: I use a tag pattern for contexts, like Sometimes I have a whole file of tasks, all of which would be done in a particular location, and I currently have to remember to add that tag to every task in that file. It would be very convenient to add the tag to the file instead. |
Beta Was this translation helpful? Give feedback.
-
I believe this is the same as #318. |
Beta Was this translation helpful? Give feedback.
-
As a workaround until this is implemented, the following contains the code to do this using Dataview and Tasks combined: |
Beta Was this translation helpful? Give feedback.
-
I appreciate the value of this feature. However, the Tasks code will need quite a lot of refactoring before this feature could be added in a sustainable and maintainable way. In the meantime, I wrote up a workaround that can be used right now, to find notes tasks in notes with particular tags: |
Beta Was this translation helpful? Give feedback.
-
Another request: |
Beta Was this translation helpful? Give feedback.
-
I don't see how you really would want to organize your to do bullet points with creating tags for each point separately. So if tasks is not reading the tags of an obsidian note otherwise, I find it really difficult to use this plugin effectively. |
Beta Was this translation helpful? Give feedback.
-
See also: |
Beta Was this translation helpful? Give feedback.
-
Another one: |
Beta Was this translation helpful? Give feedback.
-
I think this will fit fine in the For implementation, it seems like we should use the Obsidian I considered changing the plugin |
Beta Was this translation helpful? Give feedback.
-
Hello, just adding a nonspecific encouragement to frontmatter reading for Task tags. The 6.0 is great and look forward to when YAML tags can be implemented. Thanks for all the hard work! 🙌🙏 |
Beta Was this translation helpful? Give feedback.
-
Some time ago I did a bunch of experimenting with custom filters and custom groups, accessing values from the frontmatter. Eventually Tasks should make these values available, but for now, they can be obtained directly from Obsidian. What I got working was in no way good enough to write up as documentation and recommend to users. But it was actually quite a useful experiment. @c1rdan, based on your comment above, perhaps you could see if you add to Here is the Zip of my folder of sample files and queries: |
Beta Was this translation helpful? Give feedback.
-
On the assumption that nobody has actually started work on this, @ilandikov and I are going to start working together on it... 🎉 I'm mentioning this publicly to avoid duplicated work... So before anyone asks, no idea when it will be released! 😉 |
Beta Was this translation helpful? Give feedback.
-
In the meantime, I've found a cleaner workaround (starting from #232 (comment)) thanks to filter by function combined with dataview:
where #obsidian is the tag found in the task and #daily is a tag found in the frontmatter note tags. As you can see anything dataview (dv) supports can be queried here. Also I wasn't able to access "dv" directly therefore the long line this.app etc. This is probably not the most efficient since api.page look up the page again but during my testing this seems fine in time being 👌 . Thank you everyone for your hard work on Tasks and adding the great "by function" features. |
Beta Was this translation helpful? Give feedback.
-
I tend to keep all my files at the root --- it saves me the trouble of making sure files get created in the right folder and having to police whether files are in the right folder.
I use
tags:
in YAML to categorize files. I guess these tags could be viewed as applying to all content within the file, including TODOs. Is it possible to filter by "file-level tags"? Something like:tag (includes|does not include) <tag>
This could apply to in-line tag (e.g.,
#sample-tag
) or a YAML-based file-level tag, I suppose.Beta Was this translation helpful? Give feedback.
All reactions