- Where is generate the SQL query (location).
- Where is list the stats generates.

The stats modules are in the Kernel/System/Stats/*.pm location, if not
there then cvs co the latest from cvs.otrs.org, and you'll have them.


Yes, Greger, I've this files in this. But I copy TicketOverview.pm as Ticket_Overview.pm But I don�t know where I may say to OTRS that load this .pm file.
I found this sentences in /opt/otrs/Kernel/System/Stats/StateAction.pm :


#code
[...]
sub _GetHistoryTypes {
   my $Self = shift;
   my %Param = @_;
   my %Stats;
   my $SQL = "SELECT id, name FROM ticket_history_type ".
   " WHERE ".
   " valid_id = 1";
   $Self->{DBObject}->Prepare(SQL => $SQL);
   while (my @RowTmp = $Self->{DBObject}->FetchrowArray()) {
       $Stats{$RowTmp[0]} = $RowTmp[1];
   }
   return %Stats;
}
[...]
#/code

Well. If I change or add another sentence, for example, a query where I need to know how many tickets an agent closed the last month. If I need (for example) this sentence:

"select * from ticket_history where (state_id=1 and ticket_id=2) order by create_time".

Only adding it to ~/StateAction.pm, may it run??. Can you guide me around the steps to add this sentence to the interface of OTRS?

         Thanks.

               Alvaro

I�ve realize the easy that SQL is if you think in English ;)

_______________________________________________
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
Support oder Consulting f�r Ihr OTRS System?
=> http://www.otrs.de/

Reply via email to