-
-
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
Expose query.file.property similarly to task.file.property #3083
Comments
Hi thanks for the suggestion. There seems to be a problem with the formatting of text which makes it hard to read. Could you edit the description and fix it please? |
Ah sorry about that, just fixed it. Thanks for the ping. |
This feature would open up a bunch of opportunities to interact with other plugins too. Just as an example, one could define a button using meta-bind that modifies a property (to e.g. |
I had the code for this when working on #2480 and it was buggy. IIRC The biggest problem was that the query was not updated when I edited the frontmatter in the file containing the query, so I had to close and re-open the query file every time I edited its frontmatter. So it was clearly not releasable, and I chose to release access to ![]() I will edit that docs to reference this issue. |
Thanks for the explanation. Curious to see if there might be upstream improvements that fix this eventually. |
No, it is code that needs to be written in Tasks. It is just competing with a lot of other requests, and finite development time. |
Ah got it. Either way, just wanted to say again how much I appreciate all the work on this great plugin! |
Plus 1 from me! 🙂 This would make templates so much more powerful, s you would just need to modify file properties to change the behaviour. By the way: The Tasks plugin is brilliant! 🤩 |
I think I really want this too. My use case is that I have files representing people (who I need to do stuff for) or projects (that are big lists of related tasks) and when looking at either of those files, I want to be able to pick up related tasks by matching anything set as the current file tags. Currently I've landed on:
but assuming I've fully understood the issue here, I'd like to just populate Edit: I too think the plugin is amazing! |
Plus 1 from me! |
See #3083. There are a lot of caveats and limitations right now. See the comments in the code and the tests.
@NicolaCostantino You kindly asked in #3154 (comment)
I have spent about 4 or 5 hours taking my initial experiments to the point where they have some tests and I understand the behaviour. So here is the work for you have a look at: main...query-accessing-properties I've made an effort to describe in comments the issues that would currently stop me releasing the code as-is... I actually have some free time this month to do a little pair-programming on Tasks, as my main pairer is unavailable until January, so if you wanted, we could have a Zoom call to talk through the code... But first of all, could you drop some notes in here saying what you thing, and if you are indeed interested in picking this work up? |
Hi @claremacrae, I'll have a look at the changes you referred to. I could be more available this month as well to have a look at this and pairing would be great: I never worked on this codebase and Obsidian plugins before and I'm still figuring out the architecture, so any kind of onboarding would be more than appreciated! I'd be deeply interested to have a look at this development since it's an actual blocker in my workflow and querying using dataview isn't a valid solution. How should be proceed from there then? Thank you! |
Excellent!
could you drop me an email - see my profile here for address… then we can set up a pairing session. |
Ooooh - one more thought, @NicolaCostantino,
Since you are so keen to use it out, you could stun two birds with one stone by:
In my experience, there's no substitute for trying out a feature on my own vault. If there are problems to be found I find them very quickly, when I know the data in the vault. Your experience of this will be very helpful when we are considering if/when the feature will be ready for release.... |
That's a great insight @claremacrae , thank you! |
That's great. Not saying you would, but please don't spend more than an hour-or-so trying to set it up, if you have problems... It would be better for us to set a date soon to meet, and get going, than for (maybe) days to pass before we even try to find a date to start working together... 😄 |
I've pushed some more fixes to the branch, and would really like to go ahead and set up at least our first pairing session ASAP... It's better to talk than to wait, and with December holidays coming up fast, if we don't book something soon, we will have missed my window of opportunity. So please could you email me when you have a moment... Thanks in advance... |
Hey @claremacrae, |
This is 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. |
🔖 Feature description
First of all a huge thanks for maintaining this awesome plugin!
I believe my request is an extension of #2480 mostly. I would like to be able to access the file properties of the query file exactly like one is able to access them on for tasks.
I think this would be particularly useful for workflows involving templates.
✔️ Solution
This already works
I can make a template for an index file where I add a task block that will capture tasks whos file property matches a certain value similar to this:
But I am thinking of another use case where I want to define a value in the query notes frontmatter and then match tasks based on that value (without having to modify the templates task block).
An example: I am creating a 'cooking' index note with a property
matching_tag
:cooking
.Ideally the note has a task block like this:
Which would then give me all the tasks in my vault that have the tag
#cooking
.I believe this would be very handy to organize notes that pull together tasks from many different (e.g. daily planner) notes, particularly if you have several task blocks that add additonal filters (e.g. different task blocks for overdue, due soon, scheduled that all show only tasks with the #cooking tag).
Exposing
query.file.property
in the same way astask.file.property
is also fairly general and might help other folks. I am unfortunately not very familiar with the internals but was hoping that this might not be too complex, since it might be similar to the recent addition to expose task.file.property?❓ Alternatives
The only way I have found to make this work currently is to enter the value manually like this:
which works, but is much more prone to typos and needs additional user intervention.
📝 Additional Context
It seems that what I describe was already part of the testing here? Maybe I missed an issue that is tracking this already?
The text was updated successfully, but these errors were encountered: