AW: billing/invoicing out of RT

Hi,

you could use keywords, to set the division worked for. Then you can report on keywords in a given time frame.

This is a very rough keyword report, you could use. Things may not work as expected!!

Julian

REPORT:

%if ($type ne “excel”) {
<& /Elements/Header, Title => ‘Reports/Keywords/Keywords Ticketstatus’ &>
<& /Reports/Elements/KeywordTabs &>

<& /Elements/TitleBoxStart, title=>'Report options' &> <& /Reports/Elements/SelectDates, BeginDate=>$Begin_Date, EndDate=>$End_Date &> <& /Elements/TitleBoxEnd &>
<& /Elements/TitleBoxStart, title=> "tickets from ".$BeginDate->ISO." until ".$EndDate->ISO &> % } % while ( my $Queue = $Queues->Next) { % my $KeywordSelects = $Queue->KeywordSelects(); % while (my $KeywordSelect = $KeywordSelects->Next) { % my $Descendents = $KeywordSelect->KeywordObj->Descendents; % if ( $KeywordSelect->Single) { % $Descendents->{null} = "no Keyword"; % } % foreach my $kid ( keys %{$Descendents} ) { % for my $Status (@Stati) { % my $numberof = 0; % my $Tickets = new RT::Tickets($session{'CurrentUser'}); % $Tickets->LimitQueue(VALUE=>$Queue->id); % my $quote="1"; % my $oper="="; % if ($kid eq "null") { % $quote="0"; % $oper="IS"; % } % $Tickets->LimitKeyword(KEYWORDSELECT=>$KeywordSelect->id, OPERATOR=>$oper, QUOTEVALUE=>$quote, KEYWORD=>$kid);

% if ($Status eq “new”) {
% $Tickets->LimitStatus(VALUE=>“new”);
% $Tickets->LimitLastUpdated(VALUE => $BeginDate->ISO, OPERATOR => “>=”);
% $Tickets->LimitLastUpdated(VALUE => $EndDate->ISO, OPERATOR => “<=”);
% $numberof = $Tickets->Count();
% }

% if ($Status eq “open”) {
% $Tickets->LimitStatus(VALUE=>“open”);
% $Tickets->LimitLastUpdated(VALUE => $BeginDate->ISO, OPERATOR => “>=”);
% $Tickets->LimitLastUpdated(VALUE => $EndDate->ISO, OPERATOR => “<=”);
% $numberof = $Tickets->Count();
% }

% if ($Status eq “stalled”) {
% $Tickets->LimitStatus(VALUE=>“stalled”);
% $Tickets->LimitLastUpdated(VALUE => $BeginDate->ISO, OPERATOR => “>=”);
% $Tickets->LimitLastUpdated(VALUE => $EndDate->ISO, OPERATOR => “<=”);
% $numberof = $Tickets->Count();
% }

% if ($Status eq “resolved”) {
% $Tickets->LimitStatus(VALUE=>“resolved”);
% $Tickets->LimitLastUpdated(VALUE => $BeginDate->ISO, OPERATOR => “>=”);
% $Tickets->LimitLastUpdated(VALUE => $EndDate->ISO, OPERATOR => “<=”);
% $numberof = $Tickets->Count();
% }

    <td><% ($numberof || "0") %></td>

% }
% }
% }

% }
Queue Select Keyword new open stalled resolved
<% $Queue->Name %>
  <% $KeywordSelect->Name %>
  <% $Descendents->{$kid} %>
% if ($type ne "excel") { <& /Elements/TitleBoxEnd &> % }

<%ARGS>
$Begin_Date => undef
$End_Date => undef
$type => undef
</%ARGS>

<%INIT>

Select the dates

my $BeginDate = new RT::Date ($session{‘Current_User’});
my $EndDate = new RT::Date ($session{‘Current_User’});
$BeginDate->Set(Value => $Begin_Date, Format => ‘unknown’ );
$EndDate->Set(Value => $End_Date, Format => ‘unknown’ );

If no dates are given, suppose a week

if (!$End_Date) {
$EndDate->SetToNow();
}
if (!$Begin_Date) {
$BeginDate->SetToNow;
$BeginDate->AddDays (-7);
}

$BeginDate->SetToMidnight();
$BeginDate->AddDays (+1);
$EndDate->SetToMidnight();
$EndDate->AddDays(+1);

A queue object

my $Queues = new RT::Queues($session{‘CurrentUser’});
$Queues->UnLimit();

This is what we want to see

my @Stati = qw (new open stalled resolved);

if ($type eq “excel”) {
$r->content_type(‘application/vnd.ms-excel’);
}
</%INIT>

SelectDate:

Begin date: <& /Elements/SelectDate, menu_prefix => 'Begin', Default=>$BeginDate, current => 0 &> Export to excel
End date: <& /Elements/SelectDate, menu_prefix => 'End', Default=>$EndDate, current => 0 &> <INPUT TYPE="submit" VALUE="Go!"

<%ARGS>
$BeginDate => undef
$EndDate => undef
</%ARGS>-----Ursprüngliche Nachricht-----
Von: Fred Purdue [mailto:FPurdue@newopportunitiesinc.org]
Bereitgestellt: Donnerstag, 14. November 2002 19:09
Bereitgestellt in: rt-users
Unterhaltung: [rt-users] billing/invoicing out of RT
Betreff: [rt-users] billing/invoicing out of RT

Ladies & Gents,

One of my customers is currently using RT and loving it, but they are running into a problem and are looking for a better way to handle a process:

They currently keep each division in it’s own queue and then they use an internal billing policy to ‘charge back’ the costs of IT on a per ticket basis. Right now they do this by opening each resolved ticket in a time period and writing down the division name, the time spent on the ticket by each helpdesk staff member (different rates), and the resolved date. This is obviously pretty time consuming… Is there a better way to do this? What is the best way to get RT to give out a report that looks like this.

Please keep in mind I while I have a good conceptual idea of what RT is doing under the hood and I have done some customization of it, answers that involve “write a perl script to do this” will be met with a blank stare…

Ideas?

Fred

Fred Purdue
New Opportunities, Inc.
232 N. Elm St
Waterbury, CT 06702
FPurdue@NewOpportunitiesInc.org
P: 203.575.9799 x259
C: 203.887.5150