Dear Sir or Madam, we would like to write a Select statement on the OTRS database to receive only the first real human response (non auto response or info [changed user / queue etc.]).
We came up with: SELECT t.tn AS Ticketnummer, t.create_time AS TicketCreateTime, am.id AS amID, am.a_subject AS Betreff, am.create_time AS AntwortCreateTime, am.article_id AS ArticleID, th.id AS THId, th.ticket_id, th.create_time AS THCreateTime, th.history_type_id AS HistoryTypeId, TIMESTAMPDIFF(MINUTE, t.create_time, am.create_time)/60 AS ResponseTimeHour FROM article_data_mime am INNER JOIN ticket_history th ON th.article_id = am.article_id INNER JOIN ticket_history_type tt ON th.history_type_id = tt.id INNER JOIN ticket t ON t.id = th.ticket_id WHERE th.history_type_id IN (8,11) So the important part is history type 8 and 11 (E-MailAgent & SendAnswer). However this is still not reliable. Is there a better way to select only the first real human response to a ticket ? Kind Regards Mit freundlichen Grüßen Tristan Boehmke Business Intelligence E-Mail: [email protected]<mailto:[email protected]> Telefon: +49 23 36/4711 135 Fax: +49 23 36/4711 199 [cid:[email protected]] ANAXCO GmbH Geschäftsführer: Gunnar Zeisler Wilhelmstraße 45 D-58332 Schwelm Internet: www.anaxco.de <http://www.anaxco.de/> Gerichtstand: Registergericht Hagen, HRB-Nr.: 6402
_______________________________________________ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/mailman/listinfo/dev
