-
-
Notifications
You must be signed in to change notification settings - Fork 255
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
Support for using YAML front Matter Values as Variables in Queries [via placeholder values, without the need for 'filter by function'] #3154
Comments
Yes this would be good to have. I think I see this as a duplicate of: |
That other issue does require understanding ‘filter by function’ so is a little more advanced that the examples that you give. But the example you give is rather more error prone in that not all users format their dates in the same way in YAML. |
I apologize for not noticing this earlier. I look forward to the implementation of query.file.property() and hope it will support placeholders in the future. Thank you for your time and effort. |
Yes, that issue mentioned in the limitations is the same one I linked to above. I can see how the connection was not obvious. Once query.file.properties existed it would automatically be available in placeholders, although I would still worry about date formats. |
Thank you for your response. I would also like to mention that Tasks has been incredibly helpful in both my personal and professional life. Since a similar issue has already been submitted, please feel free to close this issue. |
You're very welcome - I'm glad it's been useful.
Actually, it's proposing to implement a feature which is useful for those who do not know Javascript, so I've modified the title to show how it is different from #3083, and will keep it open. |
Hi @claremacrae, is there any similar past issue/PR that I could have a look to, to figure out how the codebase works internally to purpose a PR with a consistent implementation? Edit: |
Hi @NicolaCostantino - many thanks - I've spent half an hour so far going through my notes and finding-and-resurrecting my experiments from back in July... It's going to take a while longer... Will post back either here in or in #3083 when I have something to report... |
I have spent two hours on this, and need several more hours to give you something to start with, that does not need a lot of knowledge of the Tasks code.... Can you please give me an indication of what your timescales are, and how much time you might feasibly have to work on this? |
@NicolaCostantino Moving the discussion to the lower-level issue... |
This is also now implemented via these PRs.
Those PRs describe the current limitations, and it needs documentation, but the basic facility is there now, and will be included in the next release - the date of which is not yet known. |
I have just released this in Tasks 7.15.0. The release notes have links to the relevant documentation pages. |
The feature you created will be incredibly useful in my journal documents. Obsidian Tasks helps me easily see what’s more important and what’s more urgent. It makes my life simpler and clearer. I truly appreciate it. Thank you so much, Mrs. Macrae! |
🔖 Feature description
I would like to suggest a feature that I believe could enhance the plugin's functionality. Specifically, I'm interested in being able to use values defined in the YAML front matter as variables within task queries in the same file.
For example, if I have a YAML front matter entry and a query like this:
✔️ Solution
In my use-case, <YAML front matter's workdate> would dynamically reference the workdate value specified in the YAML section of the same file. This would allow for more flexible and context-aware task filtering based on metadata defined in the file.
❓ Alternatives
No response
📝 Additional Context
If this functionality were implemented, it would significantly expand the versatility of the Tasks plugin. Users could create highly customizable templates, dynamically adjusting task queries based on file-specific YAML values. This capability would make it possible to design and maintain templates that automatically adapt to various contexts, reducing the need for manual adjustments and increasing consistency. Such a feature would not only streamline task management but also enable more advanced and reusable workflows for users who rely on templating.
Thank you for considering this request.
The text was updated successfully, but these errors were encountered: