[SOLVED]SolutionDiffInMin in Database

Moderator: crythias

Locked
Gonzalo
Znuny newbie
Posts: 75
Joined: 06 Nov 2013, 19:20
Znuny Version: 5.0.8
Real Name: Gonzalo

[SOLVED]SolutionDiffInMin in Database

Post by Gonzalo »

is the SolutionDiffInMin field store somewhere in the database? Seria For retrieval in a sql query. I know I can remove the statistical section but I'm interested for a sql query.
I need to recover this field for a sql query. I know I can take it from the statistics section but I'm interested for a sql query.

Thanks you in advance.
Last edited by Gonzalo on 17 Feb 2015, 19:09, edited 1 time in total.
OTRS 5.0.8 with Oracle Linux Server release 7.1 with MariaDB database

---------------------------------------------------------
OTRS 3.3.6 on Centos 6.0 with MySQL database
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: SolutionDiffInMin in Database

Post by crythias »

From Kernel/System/Ticket.pm:

Code: Select all

        $Data{SolutionDiffInMin} = int( ( $EscalationSolutionTime - $WorkingTime ) / 60 );
The variables are interpreted further within the same area of Ticket.pm.

It's not trivial to pull via SQL query, because it may require additional work against working Calendar.
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
Gonzalo
Znuny newbie
Posts: 75
Joined: 06 Nov 2013, 19:20
Znuny Version: 5.0.8
Real Name: Gonzalo

Re: SolutionDiffInMin in Database

Post by Gonzalo »

Thanks @crythias.

I checked yesterday this file Ticket.pm when I was looking for SolutionDiffInMin through this forum and in the web.

My problem as you said is that not every SLAs are with 24x7 calendar.

Could you help me or guide how to pull via SQL query? Now we are taking this information with the ticket_history and compare unix_dates, but this works for 24x7.

Thanks in advance,
OTRS 5.0.8 with Oracle Linux Server release 7.1 with MariaDB database

---------------------------------------------------------
OTRS 3.3.6 on Centos 6.0 with MySQL database
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: SolutionDiffInMin in Database

Post by jojo »

you can not query calendars via SQL
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Gonzalo
Znuny newbie
Posts: 75
Joined: 06 Nov 2013, 19:20
Znuny Version: 5.0.8
Real Name: Gonzalo

Re: SolutionDiffInMin in Database

Post by Gonzalo »

Thanks,

Finally we have decided to store the "scalation_response_time" and "scalation_solution_time" ticket field in other table when the ticket is created via trigger.
We have not different scalation services, only level 1. The only problem I think is if one agent change the SLA. ¿do you see other problems?

Best regards!!!
OTRS 5.0.8 with Oracle Linux Server release 7.1 with MariaDB database

---------------------------------------------------------
OTRS 3.3.6 on Centos 6.0 with MySQL database
Locked