You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2015-04-25 00:42:52

edsunix
Member
From: Sao Paulo, Guarulhos - Brasil
Registered: 2010-05-25
Posts: 8

Solution - Error in the field: relation total duration of the tickets

HI !
I solved this problem there, and I will share with you al ... I checked the table and the field responsible for storing the duration of tickets , the table is glpi_tickettasks and the field is the actiontime . Watching the php code STATISTICS menu ( stat.class.php ) , which is in /glpi/inc/folder noticed that the line 741 is in the field where actiontime in your logic calculates values greater than 0, ie , will not be calculated values containing "0". So has changed the largest operator which for most same as below , solving the problem.
case "inter_avgactiontime" :
            if ($param=="technicien_followup") {
               $actiontime_table = "glpi_tickettasks";
            } else {
               $actiontime_table = "glpi_tickets";
            }
            $WHERE .= " AND `$actiontime_table`.`actiontime` > '0' \\ change this value to `actiontime` >= '0'
                        AND ".getDateRequest("`glpi_tickets`.`solvedate`", $begin, $end);
            $query = "SELECT FROM_UNIXTIME(UNIX_TIMESTAMP(`glpi_tickets`.`solvedate`),'%Y-%m')
                                 AS date_unix,
                             AVG(`$actiontime_table`.`actiontime`) AS total_visites
                      FROM `glpi_tickets`
                      $LEFTJOIN
                      $WHERE
                      GROUP BY date_unix
                      ORDER BY `glpi_tickets`.`solvedate`";
            break;

Last edited by edsunix (2015-04-25 02:52:30)


GLPI 0.80.7 - CentOs 6.2 + Ocs Inventory  - Windows Server + PHP 5.3.3 + Apache 2.2.15 + Mysql 5.1.61

Offline

Board footer

Powered by FluxBB