obsidian-tasks icon indicating copy to clipboard operation
obsidian-tasks copied to clipboard

Optional automatic action upon completion: move a task to a "completed tasks" list within the note

Open therden opened this issue 8 months ago • 1 comments

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

  • [X] I searched previous Ideas in Discussions didn't find any similar feature requests.
  • [X] I searched previous Issues didn't find any similar feature requests.
  • [X] I am only requesting a single feature. Multiple changes should be split into individual requests, with links between them.
  • [X] I believe my requested feature will be generally applicable to other users, not just me: it is not uniquely tied to my personal workflow.

🔖 Feature description

(Note: Similar functionality has been submitted in Issues and/or covered in Discussions previously.)

A new, optional task field should be supported by Tasks, to trigger the plugin to act upon a task when it is completed. One such action would entail automatically moving the task to the end of a designated list within the note file.

✔️ Solution

Support could be added for a new, optional task field or attribute. It could be called Finish, and signified by a checkered flag emoji 🏁 (or [finish:: ] in Dataview format). The '`Finish' field should be added to the plugin's Create/Edit Task modal dialog.

If the field value is set to_list then, when the task is completed, Tasks will automatically move it from its current location within the note file to the end of a list (under the heading ### Completed Tasks, by default) within that same file.

For more flexibility, a new option could be added to Tasks' configuration settings: by default, it would display the default list heading shown above; but it would allow the user to change the heading level and text.

A possible later enhancement would support users' specifying a Finish to_list heading within a note's YAML front matter that would override the vault-wide setting for completed tasks in that particular note.

In any event: if the designated list heading doesn't exist within the note when a task containing 🏁 to_list is completed, then the plugin will write the heading at the bottom of the note file before writing the first completed task below it.

❓ Alternatives

No other currently available plugin performs the desired action automatically when the task is completed.

📝 Additional Context

This issue is being created at the maintainer's direction.

If you want this functionality added to Tasks, please respond to this description with a thumbs up - 👍.

therden avatar May 27 '24 23:05 therden