[rt-users] time worked - within a certain time period

Stuart Browne stuart.browne at ausregistry.com.au
Wed Jan 5 19:28:45 EST 2011


Doesn't that miss if someone just changes the TimeWorked value on the Basic tab of the ticket?

I use (in MySQL SQL):

SUM(IF(Field = 'TimeWorked', NewValue - OldValue, TimeTaken)) as TimeWorked

> -----Original Message-----
> From: rt-users-bounces at lists.bestpractical.com [mailto:rt-users-
> bounces at lists.bestpractical.com] On Behalf Of Ruslan Zakirov
> Sent: Thursday, 6 January 2011 11:13 AM
> To: tarminuscf
> Cc: rt-users at lists.bestpractical.com
> Subject: Re: [rt-users] time worked - within a certain time period
> 
> Hi,
> 
> SELECT SUM(TimeWorked) FROM Transactions WHERE ObjectId = <ticket id>
> AND ObjectType = 'RT::Ticket' AND Created BETWEEN <start date> AND
> <end date>;
> 
> On Thu, Jan 6, 2011 at 1:45 AM, tarminuscf <tarminuscf at gmail.com> wrote:
> >
> > Hi All,
> >
> > If I have a ticket that is 1 month old. How can I get the value of time
> > worked tallied up for only the last 7 days the ticket was worked on?
> >
> > So if the ticket has a grand total of 200 minutes on the 1 month old
> ticket.
> > But the last 7 days only have a cumulative 60 minutes worked. The value
> > I would be looking for is that 60 minutes.
> >
> > Anyone have insights on how I can get that value by means of RT
> reporting
> > or direct DB query?


More information about the rt-users mailing list