
desc ticket_history;
| id |
| name |
| history_type_id |
| ticket_id |
| article_id |
| system_queue_id |
| valid_id |
| create_time |
| create_by |
| change_time |
| change_by |
Desc ticket_history_type;
| id |
| name |
| comments |
| valid_id |
| create_time |
| create_by |
| change_time |
| change_by |
Select id, name from ticket_history_type;
I get 34 rows.. the ones that are interesting are 13 and 14 (Closed successful and unsuccessful) at least.
So....,
select create_time, history_type_id from ticket_history where ticket_id = 1444;
With the result u should see what you need to do :)
-----Original Message-----
From: otrs-bounces@otrs.org [mailto:otrs-bounces@otrs.org] On Behalf Of sharif islam
Sent: quarta-feira, 13 de Julho de 2005 16:21
To: User questions and discussions about OTRS.org
Subject: Re: [otrs] Ticket Age data
On 7/12/05, duarte.cordeiro@cm-lisboa.pt
you'll need to look at ticket_history. But search for all the rows that havfe that same ticket_id. After that, you just need to find the create action and the close... and do the math.
So here's my data. The ticket was created on 11-19 10:06 and closed 11-19 10:46. I am not sure how I can do the math with a SQL statement. I need to do something like this select timediff(2004-11-19 10:46:06 ,2004-11-19 10:06:0) | ticket_id | create_time | change_time | 1444 | 2004-11-19 10:06:07 | 2004-11-19 10:06:07 | | 1444 | 2004-11-19 10:06:07 | 2004-11-19 10:06:07 | | 1444 | 2004-11-19 10:06:07 | 2004-11-19 10:06:07 | | 1444 | 2004-11-19 10:44:15 | 2004-11-19 10:44:15 | | 1444 | 2004-11-19 10:44:15 | 2004-11-19 10:44:15 | | 1444 | 2004-11-19 10:46:06 | 2004-11-19 10:46:06 | | 1444 | 2004-11-19 10:46:06 | 2004-11-19 10:46:06 | | 1444 | 2004-11-19 10:46:06 | 2004-11-19 10:46:06 | | 1444 | 2004-11-19 10:46:06 | 2004-11-19 10:46:06 _______________________________________________ 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 fr Ihr OTRS System? => http://www.otrs.de/