Project Queries

How I keep an overview of my running projects

Keeping an overview of my projects

Keeping track of projects and their related info can be a real challenge, especially when dealing with multiple tasks and documentation

Now this example isn’t only usefull for projects, it works well for anything that needs a collection of notes and tasks, at work I changed this to show me sprint tickets for example.

And thanks to the way Logseq works I can now easily add subtasks to my projects, see related information or just fold everything to keep things nice and clean.

Journal page

This is my daily journal page, and you might notice a nice list of projects in the bottom.

Now I don’t normally unfold everything, usually it’s nice and tight like so

Project page

Let’s have a look at the project page, and then go over the elements that make this work for me.

Tags: project Since I know that the DB version wil be using tags to mark pages, I’m now always using tags to set the type of page, this is a project page but you could make it a multi type page if needed.

State: DOING Mostly for my My/Projects overview to find all active pages

The rest of the properties are more for me, but feel free to steal from that as needed.

Then the next trick is the Tasks block, first of all I always make a header block that allows for easy fold away or zoom in at the Tasks.

And then the main trick is creating a TODO block with #activeproject, this tag is what makes this task and all sub-blocks show up in my journal page. If a project is on hold for a while, I just remove this tag to hide it from my main journal page. I can’t act on it anyway and the My/Projects page will make sure it doesn’t get lost.

My/Projects page

Now there’s two places where I keep track of my projects, and my My/Projects page has a set of queries to easily find the running, waiting and even archived projects. I’m just showing active and planned projects, but you can add as many status views as you would like.

1## Active Projects
2{{query (and (page-tags [[project]]) (page-property :state "DOING"))}}
3## Planned Projects
4{{query (and (page-tags [[project]]) (page-property :state "TODO"))}}

Default Query added to Journal

This is just an itteration of my default queries, but then tweaked for the #activeproject task, and by using this tag on a TASK once I mark it done it will auto disappear.

 1{
 2    :title ["🏃‍♀️ Projects" ]
 3    :query [:find (pull ?b [*])
 4    :where
 5      [?p :block/name "activeproject"] ; name is always lowercase
 6      [?b :block/refs ?p] ; this block references ?p as oppose to being on ?p through :block/page.
 7      [?b :block/marker "TODO"]
 8    ]
 9    :result-transform (fn [result] (sort-by (fn [r] (get-in r [:block/page :block/journal-day])) result))  ; Sort by the journal date
10    :table-view? false
11    :breadcrumb-show? false
12    :collapsed? false
13}

By avoid table-view and breadcrumbs it makes the list nice and clean. No worries, if you click on the bullet of a task you will still be transported to it’s original location and know the project.