Simple Task/Todo setup with Dataview, 'Daily Notes' and 'Completed Area' plugins

I’ve been working with Obsidian for a couple days and there are a ton of posts about various Task/Todo layouts and plugins and Dataview scripts, but none of them was quite right for me.

So, this is my setup, hopefully this saves someone some time.

  1. I use the Dataview, Daily Notes and Completed Area plugins.

  2. I have a Daily Notes template with the following Dataview JavaScript version code snippet.

dataviewjs
dv.taskList(dv.pages().file
.where(f => f.name == “Tasks”).tasks
.where (t => !t.completed))

YOU NEED TO PUT THREE BACK APOSTROPHES BEFORE AND AFTER THE CODE, BUT THE EDITOR HERE IS INTERPRETING THE CODE. THE DATAVIEWJS NEEDS TO BE ON THE SAME LINE WITH THE TOP BACK APOSTROPHES, ie ```dataviewjs

Did I mention its the JAVASCRIPT Dataview code version. Note the JS.

  1. I have a Tasks note in a Daily folder, which is also where my Daily Notes populate each day. I have my daily notes set to open when I start Obsidian. The above code references the Tasks note with “Tasks”. So you can change that as desired.

  2. Within the Tasks note I have “## Tasks” and “## Completed” sections. The Completed Area plugin is going to move completed tasks from the ## Tasks to the ## Completed whenever you check off a box. You can change that word Completed to whatever you want, but you would have to change it in the Completed Area plugin settings. Also, I haven’t tested it, but if you have multiple “## Completed” headings anywhere in your vault, I bet it causes issues. The Completed Area plugin settings allow you to change the heading size as well, so you could change your Tasks note to have “### Completed” as long as you adjust the plugin heading size to be 3.

  3. There is one little glitch with the script. It pulls in the name of the Tasks note. So if your daily note has a “## Tasks” section you will see another “Tasks” below it. I just got rid of the “## Tasks” section in the daily note template. So all I see is “Tasks”.

NOTES: Ok, so that’s it I think. There is some redundancy between the Tasks note and the Daily Note, but let me explain why.

First, the Daily Note pops up as soon as I start the app, so its good to see my Tasks and I might even check something off if I completed it while not sitting in front of the app. If you leave your app in Edit Mode, then the code snippet is not going to list your tasks, you have to toggle Preview Mode to see the auto-generated task list and be able to check off the boxes. This Daily Notes aspect is not really needed, but its fun and a simple way to start getting into DV coding.

Secondly, Since the tasks in the Daily Note are auto-generated, they can’t be edited in the Daily Note. So, by having the Tasks note right next to my Daily Note in my Daily folder, I can easily click on the actual task list note and edit the tasks, and toggle Preview mode if I wanted to check off boxes. And of course, the Completed Area plugin would then move the completed task to the Completed sections, which is simple but still kind of cool.

Third, I like simple. I’m a big fan of not spending time creating complex systems that require huge amounts of effort to maintain. {I see a lot of that here, to each their own}. This task system is very simple. If you want tasks with due dates and repeat functionality, then this obviously is not for you.

I’m sure eventually a great Tasks plugin will come along and I will switch. But this is easy and good enough for now.

Let me know what you think and if I left anything out.

1 Like