Search for open tasks

This post was last updated for 307 days ago, and the information may already be changed

First I want to say I'm pretty impressed with the functionality SiYuan offers... Especially the standard mermaid, UML, ... is great. Also the SQL query possibility is a handy thing.

Now for my question:

I want to see a list of all open task items across all documents. Since I did not find this in the UI, I figured I can create a query.

It's pretty easy to find all tasks:

select * from blocks where type = 'i' and subtype = 't' order by created

But I'm stuck for the attribute/field that can filter on the state of the task (open/done).

Hoping someone can help me out?

    Welcome to here!

    Here we can learn from each other how to use SiYuan, give feedback and suggestions, and build SiYuan together.

    Signup About
    Please input reply content ...
    • wouter 1
      Author

      I was checking GitHub for a possible answer, and found a solution.

      Apparently you can query the markdown syntax of each block.

      So my new query looks like this:
      select * from blocks where type = 'i' and subtype = 't' and markdown like '%[ ]%' order by created

      And now I filter only the open tasks / open todo's.

      Likewise, one can filter the done tasks with markdown like '%[x]%'

    • MiscReply
    • ranggasan
      PRO

      You could read SiYuan User Guide, in "Content Block" section, there are several examples of query that you can use, and modify according to your needs including the one you're asking for