Obsidian Tasks - Preview fork using SQL based queries

I have released a new version of the Tasks plugin for the community to use and test, this supports SQL based queries for tasks. It is under active development and will eventually fold back into Tasks over time but I wanted to use it now and thought others may also be interested. Along with opening it up would be a good way to get feedback on the new functionality.

The code can be found on github @ sytone/obsidian-tasks-x (github.com)

To install you can do it manually or using BRAT.

Here are some example queries to show the flexibility. Documentation is slowly going up at Introduction - Obsidian Tasks X Powered (sytone.github.io). the plugin is also backwards compatible and I am keeping it in sync with any changes in the main Task repo to make merging simpler later on.

It also has extended status type capabilities to allow custom progression of task states on toggle. For example, To Do → In Progress → Done

Looking forward to seeing how people use it and getting feedback.

Queries

Get all tasks due in 2021 & completed or due in 2022 & not completed that have a # in the description.

```task-sql
WHERE ((dueDate->getUTCFullYear() = 2021 AND status->indicator = 'x') OR (dueDate->getUTCFullYear() = 2022 AND status->indicator = ' ')) AND description LIKE '%#%'
```

From BRAT

To install a pre-release, download and enable the Obsidian42 BRAT plugin, add the beta repository sytone/obsidian-tasks-x, and then have BRAT check for updates.

Manual installation

  1. Download the latest release
  2. Extract the obsidian-tasks-x-plugin folder from the zip to your vault’s plugins folder: {vault}/.obsidian/plugins/ Note: On some machines the .obsidian folder may be hidden. On MacOS you should be able to press Command+Shift+Dot to show the folder in Finder.
  3. Reload Obsidian
  4. If prompted about Safe Mode, you can disable safe mode and enable the plugin.
5 Likes

Cool! Does this differ from what dataview provides? I haven’t incorporated obsidian tasks into my workflow yet, so I wouldn’t know

It is more focused on just tasks and the meta data on the task line which dataview does not use. You could build queries of JS to handle it but at that point you just rewrote Tasks :slight_smile: