neorg icon indicating copy to clipboard operation
neorg copied to clipboard

completed task report

Open esquires opened this issue 4 years ago • 6 comments

Discussed in https://github.com/nvim-neorg/neorg/discussions/242

Originally posted by esquires December 14, 2021 I often would like to see a report of what has been done over the last n days. What do you think about adding a "#done.date" to the task tags so we can generate that type of report?

esquires avatar Dec 19 '21 09:12 esquires

As said in #242:

  • We plan this feature for 0.2 release
  • I propose using #time.done instead, so that it feels coherent with others time related tags (time.start...)

danymat avatar Dec 19 '21 10:12 danymat

sorry. I should have updated the wording. github auto copies from the original post when creating an issue.

esquires avatar Dec 19 '21 10:12 esquires

Something to help in the meantime, works on Linux at least using $date -Idate.

Navigate to your task, hover over it and use gtd as you normall would, except now it adds the #time.done ... above it.

["core.keybinds"] = {
    config = {
        ...,
        hook = function(keybinds)
            keybinds.remap(
                "norg",
                "n",
                "gtd",
                'k:r!echo "\\#time.done $(date -Idate)"<cr>j:execute "Neorg keybind norg core.norg.qol.todo_items.todo.task_done"<cr>'
            )
        end
    }
}

Note, doesn't do anything smart, if you undo the task or change it's state, you will manually have to remove it.

For an extensible solution for Neorg, I think having a time.status_update would be the most flexible. The status can be taken from the task itself and then use the time as needed for whatever views and filters :)

Edit: Snippet below doesn't account for tab and spacing of tasks, modify as you find best

eddiebergman avatar Jul 06 '22 23:07 eddiebergman

For an extensible solution for Neorg, I think having a time.status_update would be the most flexible. The status can be taken from the task itself and then use the time as needed for whatever views and filters :)

What is your idea about time.status_update ? Adding a new tag status_update everytime we change task state ?

danymat avatar Jul 08 '22 09:07 danymat

Yup, essentially this means we have two pieces of information, the state of the task and then when that state occurred, giving a comprehensive current state of everything a long when those states occured.

Just a suggestion however, I'm sure a longer time user could have different ideas on what's an extensible enough solution

eddiebergman avatar Jul 08 '22 10:07 eddiebergman

Can be useful to read:

  • https://orgmode.org/manual/Tracking-TODO-state-changes.html#FOOT43

danymat avatar Jul 08 '22 10:07 danymat