6

Are there any advanced time tracking mechanisms in Org-Mode available? I "clock in" and "clock out" my tasks but am wondering wether there is an advanced report (besides the clock table) available that:

  • shows for a month, how much I worked per day
  • plots working hours
  • aggregates a work log in a way that all tasks (done / todo) are listed as I worked on them (e.g. On the 1st I did from 10-12 task A, form 13-15 task C, etc)
3

You can do most of what you need with the stock agenda commands:

v R or short R (org-agenda-clockreport-mode)

Toggle Clockreport mode. In Clockreport mode, the daily/weekly agenda will always show a table with the clocked times for the time span and file scope covered by the current agenda view. The initial setting for this mode in new agenda buffers can be set with the variable org-agenda-start-with-clockreport-mode. By using a prefix argument when toggling this mode (i.e., C-u R), the clock table will not show contributions from entries that are hidden by agenda filtering1. See also the variable org-clock-report-include-clocking-task.

v l or short l (org-agenda-log-mode)

Toggle Logbook mode. In Logbook mode, entries that were marked DONE while logging was on (variable org-log-done) are shown in the agenda, as are entries that have been clocked on that day. You can configure the entry types that should be included in log mode using the variable org-agenda-log-mode-items. When called with a C-u prefix, show all possible logbook entries, including state changes. When called with two prefix arguments C-u C-u, show only logging information, nothing else. v L is equivalent to C-u v l.

A combination of those two commands got me a pretty good result.

You need to make sure the variable org-agenda-files has all of the files or directories you store work or events in.

The only thing left to do here is add a custom agenda view with C-c a C to give you a 30 day view, and to use some kind of ASCII plotter to plot your work hours from the clock table.

1

Are you aware of the agenda views?

It looks like the agenda meets all (or most of) your requirements.

0

M-x describe-variable org-agenda-files and check that the file that contains your clock entries is included in this list. If you use multiple files, and they are in the same directory, then this value can point to that directory.

M-x org-agenda then choose a Agenda for current week or day (Note: I'm still too new at this to know how to open agenda at the correct date range). See the manual 10.2 The Agenda Dispatcher for more information.

Now use b (org-agenda-earlier) and f (org-agenda-later) to move through the weekly views.

You will get something like

Week-agenda (W20):
Monday     13 May 2019 W20
  Timesheet:   - 
  Timesheet:  Daily Overview
  Timesheet:   - 
  Timesheet:  Daily Overview
Tuesday    14 May 2019
Wednesday  15 May 2019
Thursday   16 May 2019
Friday     17 May 2019
Saturday   18 May 2019
Sunday     19 May 2019

For me, this had some summary stuff under Monday but nothing for any other day. The value Timesheet will be the Category for the clock entry (see 10.4.1 Categories), which if not specified by #+CATEGORY: <your category here> in the agenda file will default to the file name.

Then as bright-star points out use the v key to run org-agenda-view-mode-dispatch and choose one of the options.

v c for [c]lockcheck showed me a daily report of all my clockings, including gaps in the clock.

For example:

Week-agenda (W20):
Monday     13 May 2019 W20
  Timesheet:   8:30-12:00 Clocked:   (3:30) Task 1
 Clocking gap: 90 minutes
  Timesheet:  13:30-17:30 Clocked:   (4:00) Task 1
Tuesday    14 May 2019
  Timesheet:   8:45-11:30 Clocked:   (2:45) Task 1
  Timesheet:  11:30-13:30 Clocked:   (2:00) Task 2
 Clocking gap: 60 minutes
  Timesheet:  14:30-17:15 Clocked:   (2:45) Task 1
Wednesday  15 May 2019
  Timesheet:   8:45-13:00 Clocked:   (4:15) Task 1
 Clocking gap: 45 minutes
  Timesheet:  13:45-17:00 Clocked:   (3:15) Task 1
Thursday   16 May 2019
  Timesheet:   8:45-12:00 Clocked:   (3:15) Task 2
 Clocking gap: 105 minutes
  Timesheet:  13:45-17:15 Clocked:   (3:30) Task 2
Friday     17 May 2019
  Timesheet:   8:30-12:00 Clocked:   (3:30) Task 1
 Clocking gap: 30 minutes
  Timesheet:  12:30-16:00 Clocked:   (3:30) Task 1
Saturday   18 May 2019
Sunday     19 May 2019

If you want a summary use v R for clock[R]eport.

For example:

| File              | Headline                               | Time       |         |
|-------------------+----------------------------------------+------------+---------|
|                   | ALL *Total time*                       | *1d 12:15* |         |
|-------------------+----------------------------------------+------------+---------|
|    timeclocks.org | *File time*                            | *1d 12:15* |         |
|                   | Parent 1                               | 8:45       |         |
|                   | \_  Task 2                             |            |    8:45 |
|                   | Parent 3                               | 1d 3:30    |         |
|                   | \_  Task 1                             |            | 1d 3:30 |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.