
Hello all, again :) I'm looking in archives (aorund an hour), but I can´t found nothing about my question, it's right that many people ask about stats, but I need to know only 3 things: - Where is generate the SQL query (location). - Where is list the stats generates. - I supouse that the script where is generate the stats list for apear refear to directory: /opt/otrs/Kernel/System/Stats/. But where is this file?. I try to add another *.pm file but not listed when action is called. It's arround 3 years that I don´t touch any of perl, and my knowledge base it's near to be erase. When I can add, the entry to action it's only modify sql-query, using where, count, sum , etc... Thanks for your time. Alvaro.

Hello all, again :)
I'm looking in archives (aorund an hour), but I can´t found nothing about my question, it's right that many people ask about stats, but I need to know only 3 things:
- Where is generate the SQL query (location). - Where is list the stats generates. - I supouse that the script where is generate the stats list for apear refear to directory: /opt/otrs/Kernel/System/Stats/. But where is this file?. I try to add another *.pm file but not listed when action is called. It's arround 3 years that I don´t touch any of perl, and my knowledge base it's near to be erase.
When I can add, the entry to action it's only modify sql-query, using where, count, sum , etc...
Thanks for your time.
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. /Greger -- http://www.gh-webinteractive.com
Alvaro. _______________________________________________ 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/

- 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 ;)

Hi,
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.
Simply add the following lines to your Config.pm $Self->{SystemStatsMap}->{"OTRS::Stats6"} = { Name => 'Test Stats Module', Module => 'Kernel::System::Stats::Ticket_Overview.pm', Desc => 'Description to new stats module.', UseResultCache => 1, Output => ['Print', 'CSV', 'GraphLine', 'GraphBars', 'GraphPie'], OutputDefault => 'Print', }; Regards, Markus Ruecker -- ((otrs.de)) :: OTRS GmbH :: Norsk-Data-Str. 1 :: 61352 Bad Homburg http://www.otrs.de/ :: Manage your communication!

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.
Simply add the following lines to your Config.pm
$Self->{SystemStatsMap}->{"OTRS::Stats6"} = { Name => 'Test Stats Module', Module => 'Kernel::System::Stats::Ticket_Overview.pm', Desc => 'Description to new stats module.', UseResultCache => 1, Output => ['Print', 'CSV', 'GraphLine', 'GraphBars', 'GraphPie'], OutputDefault => 'Print', };
Ok, I did it, but no adicional module apear. What happend?. Thanks and excuseme, but I do all that I can. If anyone knows something about it....... Alvaro.
participants (3)
-
Alvaro Lopez
-
greger@gh-webinteractive.com
-
Markus Ruecker