Hi,

I wrote a report module for OTRS.

Here's what README file provided in tar.gz in attached to this
message says.

Report module for OTRS (Ticket Timings)
---------------------------------------

Created by Damir Dzeko, based on code of AgentUtilities module written
by Martin Edenhofer, the author of OTRS, with a lot of help of Edgar Meij.

Unpack this where appropriate. I've used slightly modified version of Standard
theme called Redwood and so the template files and icons are located there.
Feel free to move them wherever you need them.

You'll need to manually edit files:
  Kernel/Config/Defaults.pm
  Kernel/Config/ModulesCustom.pm

Parts that need to be added/edited are provided in files:
  Kernel/Config/Defaults.pm.Report
  Kernel/Config/ModulesCustom.pm.Report

which can later be removed.

For date calculations module Date::Manip is used. It is not provided and
you'll have to install it manually either from CPAN or as a package in your
favourite software distribution. Me being a user of Debian GNU/Linux did it
with:

  apt-get install libdate-manip-perl

For business time calculations (workhours and workdays) Date::Manip needs
to know of holidays in your country. I live in Croatia and so I wrote the
.DateManip.cnf.hr which you can modify and use.

You'll need to rename it to .DateManip.cnf and place in the home-directory
of user who will be running scripts. On Debian systems such user is called
www-data. So I placed .DateManip.cnf in it's home: /var/www. For you it
might be different. I refer you to read documentation of Date::Manip.

User who will be accessing the module through web-interface needs to have
sufficient privileges in stats group or else OTRS wont even show him the
icon/link to module.

Business logic is located in the module itself: Kernel/Modules/Report.pm.
There are few things to consider there. I used very simple logic that
calculates three timings:
  - total time the ticket got updated (from first to last history record)
  - time the customer spent waiting for first real answer from agent
  - total time customer spent waiting for answer from agent

All three timings are returned as both real time (real wallclock minutes)
and business minutes. A day of business is calculated as 8 hours (hard-
coded) if the period falls into one working week (5 days). For larger
periods a day is 24 hours (converted to minutes that is 1440).

I did not cover phone-calls nor cases when agent opens ticket (and many
other strange cases when ticket gets reopened, ...). I encourage you to
do it yourself by modifying function TicketTimes().

Happy hacking,
Damir

Attachment: otrs-ticket-time-report.tar.gz
Description: GNU Zip compressed data

_______________________________________________
OTRS mailing list: dev - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/dev
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev

Reply via email to