HiveMinds / tw-install

Automatically installs Taskwarrior, Taskserver (TODO: and Timewarrior). This project aims to support automated installation of all Taskwarrior hook scripts, configuration flavours etc. with a single command.
GNU Affero General Public License v3.0
17 stars 7 forks source link

Document Explicitly how to modify start and end times of tasks in timewarrior #61

Open a-t-0 opened 3 years ago

a-t-0 commented 3 years ago
      <p>I find I reasonably often forget to terminate or mention start working on task.<br>

If one knows/is easily able to correct that start time, the start and stop times are more representative of reality work times.

So first comment how to change the start and stop times of a task ( with multiple starts and stops).

Then determine where to properly document this data for public.

a-t-0 commented 3 years ago
      <p>Source: <a rel="nofollow" href="https://timewarrior.net/docs/backdated.html">https://timewarrior.net/docs/backdated.html</a><br>

Raw documentation data:

0.You can backdate the start time when tracking an interval. This happens a lot, because it is very common to forget to start tracking time. Here are some different ways to do that:

$ timew 
There is no active time tracking.

$ timew start 3pm 'Read chapter 12'
Tracking 
  Started 2016-06-15T15:00:00
  Current            17:37:22
  Total               2:37:22

$ timew cancel
Canceled active time tracking.

$ timew start 90mins ago 'Read chapter 12'
Tracking 
  Started 2016-06-15T16:07:33
  Current            17:37:33
  Total               1:30:00
$
  1. This works the same way for the stop command. Again, it is very common to forget to also stop the clock. This is what makes time tracking difficult - everything needs to be mutable.
$ timew
Tracking 
  Started 2016-06-15T16:14:27
  Current            17:44:32
  Total               1:30:05

$ timew stop 10mins ago
Recorded 
  Started 2016-06-15T16:14:27
  Ended              17:34:39
  Total               1:20:12
$
  1. If you forgot to change your current activity in the past, you can use the start command with a date:
$ timew
Tracking bar
  Started 2016-07-03T11:00:00
  Current            21:17:44
  Total              10:17:44

$ timew start 3hours ago foo
Recorded bar
  Started 2016-07-03T11:00:00
  Ended              18:18:33
  Total               7:18:33
Tracking foo
  Started 2016-07-03T18:18:33
  Current            21:18:33
  Total               3:00:00
a-t-0 commented 3 years ago
      <p>Source: <a rel="nofollow" href="https://timewarrior.net/docs/corrections.html">https://timewarrior.net/docs/corrections.html</a><br>

Background info: the timewarrior data is not stored per task, but stored per time-tracking interval. The Id's go from 1 for the most recent time tracking interval, 2 for the interval you tracked before that etc. (so it could be that ids 1 and 2 both belong to some task with task id 342).

To modify a time tracking interval, you first you need to find the id of the interval. To do this you can type:

timew summary :year :ids

This yields a list of intervals you have tracked last year,

Then identify an interval that is incorrect. (Preferably do it immediatly when you identify an error, but you can also inspect the Date/Time (2nd) column of the output of the timew summary :year :ids command to see if there are tasks above 8 hours duration.

I have not yet found a way to inspect a single specific interval based on its id. Neither have I found a way to go show intervals that were created more than 1 year ago. (e.g. like a "task all" command).

  1. In the summary look at the left column of duration to see what the duration of the interval was,
  2. then determine how long it actually was.
  3. Then identify if the start time was correct. If it is:
    3.a Just shorten the interval duration with command timew shorten @2 PT3H46M to reduce the length of interval 2 with 3 hours and 46 minutes.
    3b. If it was not, first correct the starttime with command timew move @3 2020-05-23T09:34.
  4. Note you can't set the end time directly (only through shorten).