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 2007-11-27 12:45:49

joko
Member
Registered: 2007-10-12
Posts: 12

plugin activity suite, 2 corrections

Bonjour, 2 nouveaux bugs découverts dans le plugin activity (glpi 0.7RC3, plugins : tarballs du 26/11/07), corrections fournies sous forme de patch (diff -u)

* Dans le rapport par utilisateur, l'activité parente affiche toujours 0,0%

--- plugin_activity.functions_stats.php.orig    2007-11-27 11:38:26.000000000 +0100
+++ plugin_activity.functions_stats.php.p1      2007-11-27 11:38:36.000000000 +0100
@@ -134,7 +134,7 @@
        $query2 = "SELECT SUM(glpi_plugin_activity.realtime) AS total FROM glpi_plugin_activity";
        $query2.= " WHERE begin_date >= '". $date1 ."' AND glpi_plugin_activity.begin_date!='0000-00-00 00:00:00'";
        $query2.= " AND end_date <= '". $date2 ."' AND glpi_plugin_activity.end_date!='0000-00-00 00:00:00'";
-       $query2.= " AND deleted=0";
+       $query2.= " AND deleted=0 ";
        $query2.= getEntitiesRestrictRequest("AND","glpi_plugin_activity");
 
        $result2 = $DB->query($query2);

* Dans le rapport par utilisateur toujours, le total heures affiche la somme des activités pour tout les utilisateurs.

--- plugin_activity.functions_stats.php.p1      2007-11-27 11:38:36.000000000 +0100
+++ plugin_activity.functions_stats.php.p2      2007-11-27 11:38:41.000000000 +0100
@@ -248,13 +248,13 @@
 
        $query = "SELECT SUM(glpi_plugin_activity.realtime) AS total FROM glpi_plugin_activity";
 
-       if(!empty($chps) && (!empty($value) || $value==0))
-               $query .= ", WHERE glpi_plugin_activity.tech_num = '$tech_num' ";
+       if(!empty($tech_num))
+               $query .= " WHERE glpi_plugin_activity.tech_num = '$tech_num' ";
        else
                $query .= " WHERE '1'= '1' ";
        if ($date1!="") $query.= " AND begin_date >= '". $date1 ."' AND glpi_plugin_activity.end_date!='0000-00-00 00:00:00'";
        if ($date2!="") $query.= " AND end_date <= '". $date2 ."' AND glpi_plugin_activity.end_date!='0000-00-00 00:00:00'";
-       $query.= getEntitiesRestrictRequest("AND","glpi_plugin_activity")." AND glpi_plugin_activity.deleted=0";
+       $query.= getEntitiesRestrictRequest(" AND","glpi_plugin_activity")." AND glpi_plugin_activity.deleted=0";
 
        $result = $DB->query($query);
        $total = $DB->result($result,0,"total");

Offline

#2 2007-11-27 19:32:54

tsmr
GLPI-DEV
From: Rennes
Registered: 2005-08-26
Posts: 11,632
Website

Re: plugin activity suite, 2 corrections

Ok corrigé. merci big_smile


Xavier Caillaud
Blog GLPI Infotel

Offline

#3 2007-12-03 16:17:29

hebus
Member
Registered: 2007-12-03
Posts: 6

Re: plugin activity suite, 2 corrections

C'est corrigé sur le téléchargement sur le site ?
Parce que j'ai le problème du temps total.

edit : Je ne suis pas sous la même version, je suis en 0.68.3-2, mais le problème est la.

Last edited by hebus (2007-12-03 16:59:48)


Glpi 0.68.3-2

Offline

#4 2007-12-03 17:08:21

tsmr
GLPI-DEV
From: Rennes
Registered: 2005-08-26
Posts: 11,632
Website

Re: plugin activity suite, 2 corrections

Non uniquement pour la 0.7


Xavier Caillaud
Blog GLPI Infotel

Offline

Board footer

Powered by FluxBB