Marking a Task as "completed" in a TODO list does not set completion date

Use case or problem

When a task it marked as “completed” from the TODO list on the right pane, it does not automatically set the completion date.

For example, consider the following task:

- [ ]  A sample task

When I click the checkbox on the TODO list to mark the task as completed, the task shows as:

- [X] A sample task

However, when I click the checkbox from the page where the task was created, I get

- [X] A sample task <checkbox> 2023-11-05

I have some dataviewjs to show completed tasks on a given date, which uses that metadata:

const thisDay = dv.func.date( dv.current().file.day );
dv.taskList(dv.pages().file.tasks.where( t => t.completion && t.completion.ts == thisDay.ts ));

Proposed solution

Consistently add the completion date metadata to a task whether a task is marked as complete on the TODO list or on the page where the task is created.

Current workaround (optional)

As a workaround, I am currently forced to navigate to the page where a task is created and mark its completion from the page (instead from the TODO list) to ensure that the completion date metadata is appropriately inserted.

this is not an Obsidian Core function. Some third party plugin is adding the date.

I’m using dataview to list my tasks in another page, and then using their function to add the completion date. In other words:

  • Tasks are defined in my daily notes
  • Tasks are never completed in the daily notes directly, as I then wont get the completion date
  • I’ve got a “Running tasks” note, which lists all my open tasks, and when I complete a task there, dataview sets the completion date on the original note
1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.