obsidian-tasks-group / obsidian-tasks

Task management for the Obsidian knowledge base.
https://publish.obsidian.md/tasks/
MIT License
2.39k stars 225 forks source link

Apply properties to all tasks in a file via YAML frontmatter #3090

Open gffhcks opened 6 hours ago

gffhcks commented 6 hours ago

⚠️ Please check that this feature request hasn't been suggested before.

🔖 Feature description

I want to be able to set 'default' values for task properties, for all tasks within a specific file.

Say I'm planning a party. I have a hard due date (the party itself) for all of the tasks, but most of the individual tasks don't have specific timeline requirements. I'd like to set the due date for them in one place, and be able to change it in one place if needed.

Or maybe I have a file full of recurring daily tasks. Instead of setting them to delete on completion individually, I could just set it for the entire file.

YAML frontmatter seems ideal for this.

✔️ Solution

I imagine it working something like this:

  1. If a task property is defined in the YAML frontmatter, queries treat it as the default value for that property, for any task in the file.
  2. An explicit value set on the task itself overrides the file's default.

❓ Alternatives

A 'bulk edit' feature would be a decent alternative - i.e., select a group of tasks, and apply a property to all of them at once. This is a slightly different use case, though - and honestly, I'd prefer to see both features implemented.

📝 Additional Context

No response

claremacrae commented 5 hours ago

I do think this is a good idea, and in fact I thought it had been suggested already, but cannot find it.

@gffhcks Please help us out by making this more specific.

For example, please record what you would suggest the frontmatter properties should be called, for each property you would want to be handled, to start the planning going.