Solution time query

Moderator: crythias

Locked
tomekliw
Znuny newbie
Posts: 32
Joined: 02 Dec 2010, 11:17
Znuny Version: 3
Location: Poland

Solution time query

Post by tomekliw »

Hi everyone,

Maybe someone can share SQL query wchich displays solution time for each ticket, but without time when ticket was in pending state.

I cannot find it on this forum, thanks in advance.

TJL.
OTRS 3.1.10 on CentOS and MySql. Auth for customers and agents via both Active Directory and local database.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Solution time query

Post by crythias »

It doesn't exist because it's nontrivial to get right.
If you want to do it, you'll need to go through your article list by ticket, by date and find when the state changes to pending or closed, sum up the time, find when the state changes back to non-pending, add additional time until pending again or closed.

The good news is that you only need to look in the article table to get this information (as long as you know the state_ids that are pending and closed, as well as the given ticket_id).
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Locked