TimeWorked not always recorded as separate Transaction - workaround?

I am trying to write a command-line script to generate a report of where
my staff is spending their time each week. Something like:

Joe User - Week of 5/25
120 minutes on ticket 1722:Deploy New Foobar Server
75 minutes on ticket 1893:WhizBang Software Not Installing Correctly
etc…

I’m going with the idea of extracting all of the TimeWorked updates that
happened in a given week by getting an RT::Transactions collection,
doing a Limit ObjectID = , then Limit by Field =
TimeWorked, and then only using the OldValue and NewValue values of
those Transactions which happened within the week of interest.

It seems that my staff updates this in one of two main ways.

  1. On the MyDay report page at the end of the day
  2. On an individual Comment transaction as they update tickets

Looking at the Transactions table, it seems that I have the TimeWorked
update transactions if they are done via method #1, but method #2 only
shows up in the Transactions table as a Comment Transaction, and so I
can’t see the OldValue and NewValue of TimeWorked in order to do the
calculations.

Is there a setting I can change or a workaround to allow me to get at
that data another way?

Thanks,
Fran

Fran Fabrizio
Senior Systems Analyst
Department of Computer and Information Sciences
University of Alabama at Birmingham
http://www.cis.uab.edu/
205.934.0653

Fran Fabrizio wrote:

Looking at the Transactions table, it seems that I have the TimeWorked

Why go after the transactions? The ticket has its own “TimeWorked” field,
which should be cumulative of “TimeWorked” entries from transactions. (It
is set by editing the field directly, added to by adding a transaction
"TimeWorked".)

If you need more granularity, then I suspect that you may need to rethink
the work flow process. Perhaps your tickets should be broken down into
smaller units.

– ============================
Tom Lahti
BIT Statement LLC

(425)251-0833 x 117
http://www.bitstatement.net/
– ============================

Why go after the transactions? The ticket has its own “TimeWorked” field,
which should be cumulative of “TimeWorked” entries from transactions.
Right. I want the TimeWorked in a particular time period, not the life
of the ticket. Some of the TimeWorked comes from TimeWorked update
transactions, where I can easily do NewValue - OldValue to arrive at the
TimeWorked of that transaction, but some TimeWorked is attached to a
Comment and does not appear as a separate transaction.

Why? Because I’ve been asked to produce reports of where staff are
spending their time each week. Our tickets have lifetimes of 5 minutes
to 5 months, depending on queue and purpose. That system has worked
well for us for 5+ years, so we’re not interested in reinventing our
workflow, but would like to service the request for these reports if
possible.

The data is there somewhere - when you view a ticket, you can see each
increment of TimeWorked in the History, even in cases where it was
entered as part of a comment. In the case where TimeWorked was attached
to a comment, it appears I may need to descend/follow into the comment
to get at it, or similar - that’s what I am asking. How/where is the
individual increment of TimeWorked stored in the case where it is part
of a comment transaction?

Thanks,
Fran

Fran Fabrizio
Senior Systems Analyst
Department of Computer and Information Sciences
University of Alabama at Birmingham
http://www.cis.uab.edu/
205.934.0653

Wow - talk about not seeing the forest for the trees! I completely
missed that the Transaction table has its own TimeWorked field. Ugh.
Thanks, and sorry. :slight_smile:

Fran Fabrizio wrote:

Why go after the transactions? The ticket has its own “TimeWorked” field,
which should be cumulative of “TimeWorked” entries from transactions.

Right. I want the TimeWorked in a particular time period, not the life
of the ticket. Some of the TimeWorked comes from TimeWorked update
transactions, where I can easily do NewValue - OldValue to arrive at the
TimeWorked of that transaction, but some TimeWorked is attached to a
Comment and does not appear as a separate transaction.

Why? Because I’ve been asked to produce reports of where staff are
spending their time each week. Our tickets have lifetimes of 5 minutes
to 5 months, depending on queue and purpose. That system has worked
well for us for 5+ years, so we’re not interested in reinventing our
workflow, but would like to service the request for these reports if
possible.

The data is there somewhere - when you view a ticket, you can see each
increment of TimeWorked in the History, even in cases where it was
entered as part of a comment. In the case where TimeWorked was attached
to a comment, it appears I may need to descend/follow into the comment
to get at it, or similar - that’s what I am asking. How/where is the
individual increment of TimeWorked stored in the case where it is part
of a comment transaction?

Thanks,
Fran

Fran Fabrizio
Senior Systems Analyst
Department of Computer and Information Sciences
University of Alabama at Birmingham
http://www.cis.uab.edu/
205.934.0653