Russell Adams <rlad...@adamsinfoserv.com> writes:

> I make extensive use of timestamps for billing (timesheet)
> purposes. I'm looking to automate this more, and I find the existing
> clocking system inadequate. I'm hoping someone can point me in the
> right direction.
>
> Today I have log mode enabled so that each time I close a TODO item,
> it records the date and time it was closed. At regular intervals while
> working I add inactive timestamps to my notes. I've mapped that to a
> single key, so it's quite fast. If I switch tasks, have an update,
> made progress I want to note to myself, or leave and return I add an
> inactive timestamp. I have well over 1000 inactive timestamps in my
> current file.
>
> Later I can open my agenda view on the working file, choose my
> timespan (week or month), enable log mode to show when items were
> closed, and then enable inactive timestamps to view all of the
> timestamps. This itemizes all the events organized by time into a
> timeline.
>
> It's fairly straightforward from that timeline to count my hours based
> on the record of where I spent my time. It is unfortunately a very
> manual process.
>
> I find Org's clocking to be too detailed, and that it doesn't play
> well with dynamically organized hierarchies of notes. I frequently
> create and close subtasks, or switch parts of the tree. Clocking each
> one is too much overhead, and too granular. I don't need to provide
> down to the minute reports of each item. It also doesn't appear to
> allow rounding of values, so I still have to adjust the results.
>
> What I envision is a way to count items in the agenda view to produce
> a time report. Counting any inactive timestamp as 15 minutes, where if
> a half hour or more is logged I round up to bill the hour. Closed TODO
> items should count toward billing that whole hour. Clearly this should
> be customized.
>
> The point is that I'm not worried about accounting time by task,
> instead I'm aggregating tasks into accounting by whole hours.
>
> I'm looking at org-element, and it appears I'd have to do my own
> agenda style scan of the whole tree to find items to classify by
> hour. While I'm somewhat proficient at elisp, that sounds like a steep
> wall to climb.
>
> Is there an iterative way to review items in an agenda view so I can
> do the math to produce a report?
>

Russell,

I don't have an answer for your specific problem. However, I was
wondering if you looked at the options to configure the built-in time
clocking and report table?

The reason I asked is because I had basically the same/similar issue
when I was using Org to do my invoicing. I would have lots of sub tasks
which I would clock in/out and end up with far too many line items and
overly detailed reports. However, I was able to change this just using
tghe built in facilities of the clock table.

I've been meaning to finish cleaning up my org invoicing solution for
ages, but it is one of those projects which doesn't get high enough in
the todo list. I'm also not a great elisp coder (only barely
adequate). However, yu might find some of what I've done useful or might
point you in the right direction. See
https://github.com/theophilusx/org-invoicing

Unfortunately, I cannot guarantee that code currently works. It is code
based on what I use to use for my invoicing, which was pretty hacky, but
worked well for me. I started to pull it together to make it more a
usable module for anyone who needed invoicing support. To be honest, I
cannot remember how far I got before getting distracted by a different
shiny thing. What I can say is that the basic ideas do work and I
successfully used it for invoicing for some time (I'm now retired, which
is partly why I've not finished it off - I don't need to invoice clients
anymore). 

I do think that if you need to go down the inactive timestamp route,
your in for a lot of work. The main point about inactive timestamps is
that they are not involved in any reporting or processing. So, you will
need to write much of the code yourself if yo want to use that to
generate your invoices and calculate billing. You really need to rule
out the custom time table option first as that would be a lot less work
overall and probably easier to maintain. 

Reply via email to