[rt-users] Generate a billing report?
Tom Lanyon
tom at netspot.com.au
Thu Feb 28 21:46:25 EST 2008
You could do that pretty easily with a basic SQL query...
select
objectid as ticket,
date_trunc('month', created) as month,
sum(cast(newvalue as int) - cast(oldvalue as int)) as timeworked
from transactions where
field = 'TimeWorked' and type = 'Set'
and objecttype = 'RT::Ticket'
and newvalue > oldvalue
group by ticket, month
order by month desc;
That will show you time worked, per ticket, per month for your
billing. Get rid of the 'group by' clause and the sum() on timeworked
and you'll have more of a break down of how many times each ticket was
worked on and for how long.
Tom
On 29/02/2008, at 10:01 AM, Kenneth Crocker wrote:
> John,
>
> No, but I've thought about it. Trouble is, RT doesn't separate time
> between intervals. Time worked is simply added, which means you cannot
> tell how much time belongs in the last month, or whatever. You would
> have to define your own table in the DataBase with the kind of data
> delineation you needed and then modify RT (probably a cron job) to
> update that table with the type of data you need. Not something I'm
> willing to do right now.
>
>
> Kenn
> LBNL
>
> On 2/28/2008 2:12 PM, John Arends wrote:
>> I'm curious if anyone has used RT for job billing? It's pretty easy
>> to
>> record the time for each task you perform but there really isn't a
>> good
>> mechanism for generating a bill to send to a client.
>>
>> Has anyone tried anything like that?
>> _______________________________________________
>> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>>
>> Community help: http://wiki.bestpractical.com
>> Commercial support: sales at bestpractical.com
>>
>>
>> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
>> Buy a copy at http://rtbook.bestpractical.com
>>
>
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
--
Tom Lanyon
Systems Administrator
NetSpot Pty Ltd
More information about the rt-users
mailing list