GothenburgBitFactory / timewarrior

Timewarrior - Commandline Time Tracking and Reporting
https://timewarrior.net
MIT License
1.2k stars 91 forks source link

Allow multitasking / overlapping intervals #492

Open hijackeel opened 2 years ago

hijackeel commented 2 years ago

I'm using taskwarrior with the timewarrior on-modify hook script. While compiling some software (one task), I worked on some other tasks. Taskwarrior lets you "start" multiple tasks at once, but timewarrior stops timing the first task when the second task starts. I'd like to be able to easily record and see how long the compilation took, as well as the other tasks accomplished concurrently. I tried modifying the interval in timewarrior, but it wouldn't let it overlap with another.

smemsh commented 2 years ago

Timewarrior is not keeping a record of accumulated time per tag. this information could be extracted, but it really is only tracking which tags are active in a certain time interval. Time intervals do not overlap by definition. Timewarrior records only one timeline. You would need to record this information inside tasks in a UDA and update it every time in the hook if you wanted to track an accumulated time per task.

Robotic-Brain commented 1 year ago

I just ran into the problem that timewarrior can't handle overlaps. (See below for detailed Workflow) Is there some command which can achieve this use case?

Related #373 (my use case would be :merge) Related #151

Steps to Reproduce:

  1. I started 2 activities in parallel tracking one of them with timewarrior. Let's call the start time T0 and the tag A
  2. After I finished one of the activities i stopped the tracking in timewarrior at time T1
  3. After I finished the second activity (At time T2) i wanted to add a new interval from T0 to T2 with tag B
  4. Now timew track barked at me that overlapping intervals are not allowed. But :adjust could fix it
Summary before trying to track 2nd interval: Tags Start End
A T0 T1

Track command:

timew T0 - T2 B :adjust

What happened:

I was surprised to see that the first interval with tag A just got deleted. However the second interval was added as expected.

What I intended to happen:

My expectation was that the interval from T0 to T1 would get modified to include the tag B and a second interval from T1 to T2 with tag B would be created. Resulting in this summary:

Tags Start End
A B T0 T1
B T1 T2
nexpspace commented 2 weeks ago

I'm using taskwarrior with the timewarrior on-modify hook script. While compiling some software (one task), I worked on some other tasks. Taskwarrior lets you "start" multiple tasks at once, but timewarrior stops timing the first task when the second task starts. I'd like to be able to easily record and see how long the compilation took, as well as the other tasks accomplished concurrently. I tried modifying the interval in timewarrior, but it wouldn't let it overlap with another.

I have nearly the same use case. Not only for compilations, but also doing update. E.g. I do server updates on a customer server - ofc I need to track that time... but because the update can quite take I while I will do other stuff in parallel, let it be even more updates for other customers or other tasks. So this time keeping of multiple tasks in combination with taskwarrior would be great for me.