
Hi Gonzalo, Gonzalo Balatti schrieb:
I need to disable after closing a ticket the time. The time must stop with the time of close the ticket. How to configure this in the otrs???
The ticket age is always calculated as time gap from ticket creation to your actual system time. This is reasonable because tickets could be reopened, so the time between creation and closure can changes after reopening. You can receive the time gap you require through SQL-queries on the ticket-history-table by investigating the state-change-history-entries. Here, you see a query that returns all successive state-changes. You can take it as base for your needed modifications. SELECT (SELECT tn FROM ticket WHERE id = th.ticket_id) AS Ticket, SUBSTRING_INDEX(TRIM(BOTH '%%' FROM th.name), '%%', 1) AS state1, SUBSTRING_INDEX(TRIM(BOTH '%%' FROM th.name), '%%', -1) AS state2, paare.time1 AS time1, th.create_time AS time2, (UNIX_TIMESTAMP(th.create_time)-UNIX_TIMESTAMP(paare.time1))/3600 AS diffhour FROM ( /* History-Paare der aufeinanderfolgenden Statusaenderungen */ SELECT th.id AS id1, th.create_time AS time1, (SELECT MIN(id) FROM ticket_history WHERE ticket_id = th.ticket_id AND history_type_id = 27 AND id > th.id) AS id2 FROM ticket_history th WHERE th.history_type_id = 27 OR th.history_type_id = 1/* nur neue Tickets oder State-Updates */ ) AS paare INNER JOIN ticket_history th ON paare.id2 = th.id ORDER BY th.ticket_id, paare.id2;
/Thank you very much for you help, Regard, / Gonzalo Balatti Viera - CSU IBM Uruguay.
Grettings to Uruguay (what's the temperature, humidity?) Alex
------------------------------------------------------------------------
_______________________________________________ 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 orr consulting for your OTRS system? => http://www.otrs.com/