
The database schema says: ticket_history.type_id = ticket_history_type.id In my database this is not the case. ticket_history.type_id contains only three values: 1,2,5. ticket_history_type.id contains values starting from 40: id;name 40;NewTicket 41;FollowUp 42;SendAutoReject 43;SendAutoReply 44;SendAutoFollowUp 45;Forward 46;Bounce 47;SendAnswer 48;SendAgentNotification 49;SendCustomerNotification 50;EmailAgent 51;EmailCustomer 52;PhoneCallAgent 53;PhoneCallCustomer 54;AddNote 55;Move 56;Lock 57;Unlock 58;Remove 59;TimeAccounting 60;CustomerUpdate 61;PriorityUpdate 62;OwnerUpdate 63;LoopProtection 64;Misc 65;SetPendingTime 66;StateUpdate 67;TicketFreeTextUpdate 68;WebRequestCustomer 69;TicketLinkAdd 70;TicketLinkDelete 71;SystemRequest 72;Merged 73;ResponsibleUpdate 74;Subscribe 75;Unsubscribe 76;TypeUpdate 77;ServiceUpdate 78;SLAUpdate What happens in my database ? OTRS seems to work just fine... Regards, Regis -----Message d'origine----- De : otrs-bounces@otrs.org [mailto:otrs-bounces@otrs.org] De la part de Ali, Mustaqil M Envoyé : vendredi 25 avril 2008 12:24 À : User questions and discussions about OTRS.org Objet : Re: [otrs] SQL query for first response time and resolution time Hi, I'm pretty sure you could do this with data from the ticket_history table. Select based on the ticket_id, and then based on the history_type_id (which in turns relies on the ticket_history_type table), you should be able to build up dates of when the ticket was received, replied to, and closed indefinitely/last.
-----Original Message----- From: otrs-bounces@otrs.org [mailto:otrs-bounces@otrs.org] On Behalf Of Régis OBERLE Sent: 16 April 2008 13:09 To: otrs@otrs.org Subject: [otrs] SQL query for first response time and resolution time
Hello everybody,
I want to build a report showing first response time and resolution time. The stat module doesn't seem to be able to do this. So, I started using an external reporting tool. The hardest part is to build the SQL query. Can anybody help me finding these informations in the database ? Do I have to compute these informations from "start" and "end" fields, or is the data stored in the database (maybe the <ticket> table) ? Thank you for your help.
Regards,
Régis _______________________________________________ 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 or consulting for your OTRS system? =tp://www.otrs.com/
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 or consulting for your OTRS system? =http://www.otrs.com/