Proposal: task Checkbox clicking hook

I might want to apply a template change to a line when I check the box, and having a way to run code (like adding :white_check_mark: /today at the end of a task line when it’s checked, and possibly moving the line to the bottom of the file) might be nice

4 Likes

+1 on this :slight_smile:
I would like to enhance silverbullet-todoist with the ability to set tasks to done.
@zef would it be possible to allow space-script hooks that react to task check box clicks?

1 Like

This Github issue seems related:

It mentions a task:stateChange event being fired and proposes a task:stateChangeExternal event that might be used for Todoist.

As you mention, there is already a task:stateChange event. However, it only works when the state is changed on the task page. If you click the task in a query results, the event doesn’t fire.

Once the mentioned GitHub issue is resolved, many things could be automated with task. Until then, it’s difficult to do any kind of automation on task completion.

1 Like