GothenburgBitFactory / task-timewarrior-hook

MIT License
5 stars 0 forks source link

Add 'task log' to commands processed by on-modify hook #17

Open a7hybnj2 opened 6 years ago

a7hybnj2 commented 6 years ago

Add functionality to the hook to track “task log start:### end:### description”

Use case: after a phone call I like to add it to the log including a start and stop time. Would be nice if this could also show up on the timew summary.

a7hybnj2 commented 6 years ago

In my initial playing around with hooks I don't think on-modify fires on 'task log' it does appear to fire 'on-add' however.

pbeckingham commented 6 years ago

That makes sense, 'task log' is just 'task add' with an implicit 'status:completed'.

lauft commented 6 years ago

Does task log trigger any hook at all? If not, we need to defer this issue to taskwarrior as well if such a feature is feasible. In any case we need a new hook script which then triggers the appropriate timewarrior actions (I guess it just a simple timew track <start> - <end>).

a7hybnj2 commented 6 years ago

Yes, 'task log' appears to fire 'on-add' as I mentioned previously. I haven't had the time to do much testing beyond that.

ChargingBulle commented 5 years ago

I do this quite often too. It's abuse of the start tag and it doesn't function at all but it "feels like it should" work. Because TimeWarrior and TaskWarrior get so easily out of sync I sometimes perform a task log on something immeditately after having done a timew track on it.

Example usage:

timew track 10:00 - 12:00 do the thing
&& task log start:10:00-1d end:12:00-1d do the thing
&& task 123 annotate "Mailed example@example.com at 11:46, absence autoresponse"

Right now I don't know how to perform an operation on +LATEST. Usually I look up the next ID via ids or in case of logged events, perform two action steps.

Having a task for it is useful. I frequently filter through completed tasks via the completed report. task comp dog vac for when the dog was vaccinated last time (example).

(Not useful semi-rant) The overall problem is, of course, that task and taskw are completely different projects and they don't incorporate that well (task only interacts with timew like half ot the time, never syncs after an edit, timew doesn't know about tasks and can't sum time for a task, doesn't know about projects, ... etc the list goes on. It's almost like the tools hate each other and don't want to cooperate).