obsidian-dataview
obsidian-dataview copied to clipboard
Allow displaying of the note link with a TASKS query
Is your feature request related to a problem? Please describe. I created a note with a dataview pulling in all the tasks. But if I use TASKS to do that I only see the tasks, not other information (most importantly from which note the task is. I can use a TABLE query like described here https://forum.obsidian.md/t/create-dataview-table-of-multiple-tasks-within-notes/31054 but then I can't check the tasks.
I use this query to make sure that I don't miss any task hiding somewhere in my notes and to be able to close any task which I already did complete.
Describe the solution you'd like A way to allow display of the note containing the task in TASKS
Describe alternatives you've considered A way to be able to complete tasks in TABLE
This can be done with a bit of DVJS. The dv.taskList
method should help.
will look into it in the future, do you have perhaps a code snippet handy? 😀
BUT.. I know why I came up with the request.
some code:
TASK
FROM !"300 Planner" and !"900 Support" and !#type/boards/kanban
WHERE !completed
different views In one vault:
- [ ] task one
- [ ] task two
in an other vault:
[[Note1]]
- [ ] task one
[[Note2]]
- [ ] task two
any idea? i guess I found it... the later one is dataview 0.4.26 and the first one 0.5.41, so either WAD for design change or a bug.
Plus in the updated version (just did that) I also have the issue that it shows the next line after a task if the task finishes with a note link.
It sounds like GROUP BY file.link
or GROUP BY section
at the end of your query would be enough.
you are correct.. is this somewhere in the change notes? because in the old version the TASKS command was doing it by default. The new approach is better perhaps as more flexible 😀
TABLE WITHOUT ID
regexreplace(Tasks.text, "\[.*$", "") AS Task, Tasks.due AS "Due Date", file.link AS "File"
FROM !"300 Planner" and !"900 Support" and !#type/boards/kanban
WHERE file.tasks
FLATTEN file.tasks AS Tasks
WHERE !Tasks.completed
TASK
FROM !"300 Planner" and !"900 Support" and !#type/boards/kanban
WHERE !completed
GROUP BY file.link
now I just wonder how code would look like for the table which would allow completing the task.
We can't really use checkboxes from a table to do that since the "checking" doesn't change the actual note. It might work through clever DVJS trickery but I haven't figured out how or if it's doable at all.