emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: Timeclock workflow?


From: Bernt Hansen
Subject: [Orgmode] Re: Timeclock workflow?
Date: Fri, 25 Apr 2008 13:35:23 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

"Avdi Grimm" <address@hidden> writes:

> Hi folks,

Hi :)
>
> I keep wanting to use timeclock along with org-mode, both to help with
> my time reporting for work, and because I think the resulting
> statistics might be interesting.  However, whenever I start to use it,
> two things tend to happen: 1) I'll clock-in, and then forget to clock
> out, and wind up with hours on the clock for a ten minute task; and 2)
> I'll simply forget to clock in.

I think that's just a habit you form.  If the clock is running it's
pretty obvious in the modeline.  With the default setting

(setq org-clock-out-when-done t)

the clock stops as soon as you change the status of the task to a DONE
state.  When you're done you should try to get in the habit of marking
the task as DONE or clocking out.

>
> Now, both of these can be remedied by manually editing
> clock-in/clock-out times, and org-mode makes this fairly easy.  But
> I'm wondering if anyone else has this problem, and if you've come up
> with any solutions.  Lately I've been thinking it might be nice to
> have a retroactive timeclock command which would let me say "I've been
> working on task X for the last half-hour", and it would automatically
> enter the clock-in/clock-out times.  Even better, it would truncate
> the clock-out time of any other task that overlapped.
>
> What do you all think?
>

Moving 'back in time' (ie you started something 5 minutes ago) I would
clock in the task, use org-clock-goto to get to the clock line and edit
the time back 5 minutes and let it continue normally.  It'll calculate
the total minutes when you clock out based on your new start time.  The
number of minutes in the modeline will be wrong but I can live with
that.

I don't think automatic editing and truncating of other task's timeclock
data is a good idea in general.  If you enter some wrong time it'll blow
away good clock times and restoring those is painful / impossible.

------------------------------------------------------------------------

I normally run a simple script to look at my clock times for the day to
identify holes and broken clock lines (start times with no stop time
etc). Sometimes when you org-clock-in with a running clock it can't find
the clock line (because you reorganized your file and moved the task
somewhere else) so it leaves that line open.

ts helps me find those cases so they don't get completely lost in my
time reports.

,----[ ts ]
| #!/bin/sh
| 
| # Default to today if no date is specified
| DATE="$1"
| if [ "$DATE" == "" ]
| then
|         DATE=$(date +'%Y-%m-%d %a')
| fi
| 
| grep -h "CLOCK.*$DATE" ~/git/org/*.org|sed 's/^[ \t]*//'|sort
`----

$ts gives me output for today by default


,---- [ ts output ]
| $ ts
| CLOCK: [2008-04-25 Fri 08:05]--[2008-04-25 Fri 08:20] =>  0:15
| CLOCK: [2008-04-25 Fri 10:10]--[2008-04-25 Fri 10:11] =>  0:01
| CLOCK: [2008-04-25 Fri 10:11]--[2008-04-25 Fri 10:12] =>  0:01
| CLOCK: [2008-04-25 Fri 10:17]--[2008-04-25 Fri 10:18] =>  0:01
| CLOCK: [2008-04-25 Fri 10:23]--[2008-04-25 Fri 10:27] =>  0:04
| CLOCK: [2008-04-25 Fri 10:27]--[2008-04-25 Fri 10:31] =>  0:04
| CLOCK: [2008-04-25 Fri 10:31]--[2008-04-25 Fri 10:36] =>  0:05
| CLOCK: [2008-04-25 Fri 10:41]--[2008-04-25 Fri 10:44] =>  0:03
| CLOCK: [2008-04-25 Fri 10:44]--[2008-04-25 Fri 10:45] =>  0:01
| CLOCK: [2008-04-25 Fri 10:48]--[2008-04-25 Fri 10:53] =>  0:05
| CLOCK: [2008-04-25 Fri 10:59]--[2008-04-25 Fri 12:27] =>  1:28
| CLOCK: [2008-04-25 Fri 12:28]--[2008-04-25 Fri 12:29] =>  0:01
| CLOCK: [2008-04-25 Fri 12:32]--[2008-04-25 Fri 12:48] =>  0:16
| $
`----

$ ts 2008-04

will give me output for all of April 2008 which I find useful to check
the clock data before I do my monthly timeclock reports.

-Bernt




reply via email to

[Prev in Thread] Current Thread [Next in Thread]