die Suche brachte mich leider nicht weiter, daher erstelle ich mal den Thread und freue mich auf etwas Unterstützung.
Es gibt einige Anleitungen wie man MySQL-Abfragen erstellt, die dann mit Jasper Reports oder Pentaho gut lesbare Reports generieren.
Leider sind die Beispiele für OTRS3 ausgelegt und ich nutze die Version OTRS 4 ITSM.
Beispiele aus dem Internet die leider nicht mehr funktionieren:
"Closed Tickets"
Code: Select all
SELECT DISTINCT
count(*) AS anz
, q.name
, q.id
FROM
`queue` sq INNER JOIN `ticket` st ON sq.`id` = st.`queue_id`
INNER JOIN `ticket_history` th ON st.`id` = th.`ticket_id`
INNER JOIN queue q on q.id = st.queue_id
WHERE
st.queue_id IN (${queue})
AND th.history_type_id IN (1,27)
AND th.state_id IN (2,3)
AND th.create_time BETWEEN ${startdate} and ${enddate}
GROUP by q.name
LIMIT 100000000
Code: Select all
SELECT
count(*) AS anz
, q.name
, q.id
FROM ticket st
INNER JOIN queue q ON q.id = st.queue_id
WHERE
st.queue_id = (${id})
and st.create_time between ${startdate} and ${enddate}
GROUP BY q.name
Lieben Gruß