How to use task states?

The tasks tutorial ( Tasks ) shows how the interaction works wen toggling between custom task states on a task.

How do I create tasks with custom task states?

Thanks for taking the time to upload a screenshot. But I’ve read that and still don’t understand how to add a taskstate.

The text says how to query task state. My task state table is empty.

Here is something I have attempted to add task state to a task.

  • Task with custom taskstate [STARTED][NOT STARTED]

task.
You just define the states on any page

* [STARTED] first state
* [NOT STARTED] second state 

And then you just do your normal tasks

* [  ] Task 1
* [  ] Task 2

Notice the double spaces in the tasks so it doesn’t get conver d into normal true/false tasks

I don’t want to waste you time, I’m sure you must be busy with this awesome project. But here are a few follow up questions

  • A new entry was created in my taskstate table Task@118 taskstate {{state}} 1 Library/Core/Query/Task. Now my tasks toggle between NOT STARTED, STARTED, and {{state}}. I have no idea how {{state}} got there
  • If it possible to scope states to some conxets/pages/other filter? I want different custom states for different kinds of tasks.

but also be aware that status declaration are systemwide as far as i know.

so the states you define for one “project” and the states you define for other “projects” are all used for custom tasks:

so if you have [STARTED] [NOT STARTED]
and [:green_circle:], [:yellow_circle:], [:orange_circle:], [:red_circle:] for another kind of tasks.

every task will cycle through all 6 states.

i think i answered your questions unintentionally with my message before.

the {{state}} must be mixed into from a random page.
search for the text “{{state}}” through your pages to identify where this ghost state came from. and just delete it.

It comes from

Library/Core/Query/Task

The page looks like this

---
tags: template
description: Generic task template that supports updating the status back in the origin page
---
* [{{state}}] [[{{ref}}]] {{name}}

Not sure how it got there or if it should be there. It does not seem to exist in silverbullet.md https://silverbullet.md/Library/Core/Query/Task

Perhaps it is a remain from silverbullet1?

you can delete everything from inside the Library/Core(if you didn’t put any of your own code there) if your are using v2.x.x

Library/core is only necessary for v0.10.x. for 2.1.x it’s obsolate and it does more harm than good :stuck_out_tongue:

1 Like