Page 2 sur 3
Re: Erreur export CSV Statistiques
Posté : mer. 2 août 2023 15:44
par tcolin
Voici le dernier enregistrement de la table ttoken
Re: Erreur export CSV Statistiques
Posté : mer. 2 août 2023 15:47
par Flox
Pouvez-vous vérifier que l'adresse IP affichée sur cette ligne correspond bien à l'adresse IP affichée dans la section Administration > Système > Client > IP
Re: Erreur export CSV Statistiques
Posté : mer. 2 août 2023 15:55
par tcolin
Je vous confirme que les adresses IP sont identiques
Re: Erreur export CSV Statistiques
Posté : mer. 2 août 2023 15:56
par Flox
Pouvez-vous transmettre l'URL du bouton export csv
Re: Erreur export CSV Statistiques
Posté : mer. 2 août 2023 16:05
par tcolin
Re: Erreur export CSV Statistiques
Posté : mer. 2 août 2023 16:11
par Flox
Pouvez-vous vous activer le mode débug de l'application et indiquer si des erreurs sont affichées sur la page des statistiques.
Re: Erreur export CSV Statistiques
Posté : mer. 2 août 2023 16:19
par tcolin
Voici ce qu'il y a d'afficher avec le mode debug sur la page statistiques :
DEBUG MODE :
VAR: where_service= | where_agency= | POST_tech=% | POST_service=% | POST_agency=% | POST_state=% | cnt_agency= | cnt_service=
Filtre :
Tous les services
Tous les types
Tous les techniciens
Toutes les catégories
Toutes les criticités
Tous les états
Période :
Août
2023
SELECT COUNT(`tincidents`.`id`) FROM `tincidents`,`tusers` WHERE `tincidents`.`user`=`tusers`.`id` AND `tusers`.`company` LIKE '%' AND `tincidents`.`technician` LIKE '%' AND `tincidents`.`criticality` LIKE '%' AND `tincidents`.`type` LIKE '%' AND `tincidents`.`category` LIKE '%' AND `tincidents`.`u_service` LIKE '%' AND tincidents.state LIKE '%' AND `tincidents`.`date_create` NOT LIKE '0000-00-00 00:00:00' AND `tincidents`.`date_create` LIKE '2023-08-%' AND `tincidents`.`disable`='0'
SELECT day(`tincidents`.`date_create`) AS x,COUNT(`tincidents`.`id`) AS y FROM `tincidents`,`tusers` WHERE `tincidents`.`user`=`tusers`.`id` AND `tusers`.`company` LIKE '%' AND `tincidents`.`technician` LIKE '%' AND `tincidents`.`u_service` LIKE '%' AND tincidents.state LIKE '%' AND `tincidents`.`criticality` LIKE '%' AND `tincidents`.`type` LIKE '%' AND `tincidents`.`category` LIKE '%' AND `tincidents`.`date_create` NOT LIKE '0000-00-00 00:00:00' AND `tincidents`.`date_create` LIKE '2023-08-%' AND `tincidents`.`disable`='0' GROUP BY x ORDER BY x
Array ( [0] => 1 )
[2,1]
Array ( [0] => 3 )
[1,3]
SELECT CONCAT_WS('. ', left(tusers.firstname, 1), tusers.lastname) AS technician, tgroups.name AS group_name, COUNT(*) as tickets FROM tincidents INNER JOIN tusers ON (tincidents.technician=tusers.id) INNER JOIN tgroups ON (tincidents.t_group=tgroups.id) WHERE tincidents.technician LIKE '%' AND tincidents.type LIKE '%' AND tincidents.u_service LIKE '%' AND tincidents.state LIKE '%' AND criticality like '%' AND tincidents.category LIKE '%' AND tincidents.date_create LIKE '%-08-%' AND tincidents.date_create LIKE '2023-%' AND tincidents.disable LIKE '0' GROUP BY tusers.id,tgroups.id ORDER by tickets DESC
SELECT ttypes.name as type, COUNT(*) as nb FROM tincidents INNER JOIN ttypes ON (tincidents.type=ttypes.id) WHERE tincidents.disable LIKE '0' AND tincidents.technician LIKE '%' AND tincidents.u_service LIKE '%' AND tincidents.state LIKE '%' AND tincidents.type LIKE '%' AND criticality like '%' AND tincidents.category LIKE '%' AND tincidents.date_create LIKE '%-08-%' AND tincidents.date_create LIKE '2023-%' GROUP BY ttypes.id ORDER BY nb DESC
SELECT tstates.name as state, COUNT(*) as nb FROM tincidents INNER JOIN tstates ON (tincidents.state=tstates.id) WHERE tincidents.disable LIKE '0' AND tincidents.technician LIKE '%' AND tincidents.u_service LIKE '%' AND tincidents.state LIKE '%' AND tincidents.type LIKE '%' AND criticality like '%' AND tincidents.category LIKE '%' AND tincidents.date_create LIKE '%-08-%' AND tincidents.date_create LIKE '2023-%' GROUP BY tstates.number ORDER BY nb DESC
SELECT tcategory.name as cat, COUNT(*) as nb FROM tincidents INNER JOIN tcategory ON (tincidents.category=tcategory.id) WHERE tincidents.disable='0' AND tincidents.type LIKE '%' AND tincidents.u_service LIKE '%' AND tincidents.state LIKE '%' AND criticality like '%' AND tincidents.date_create LIKE '%-08-%' AND tincidents.date_create LIKE '2023-%' AND tincidents.technician LIKE '%' GROUP BY tcategory.name ORDER BY nb DESC limit 0,10
SELECT tservices.name as service, COUNT(*) as nb FROM tincidents, tservices WHERE tservices.id=tincidents.u_service AND tincidents.disable='0' AND tincidents.u_service!='0' AND tincidents.type LIKE '%' AND criticality like '%' AND tincidents.u_service LIKE '%' AND tincidents.state LIKE '%' AND tincidents.category LIKE '%' AND tincidents.date_create LIKE '%-08-%' AND tincidents.date_create LIKE '2023-%' AND tincidents.technician LIKE '%' GROUP BY tservices.name ORDER BY nb DESC
SELECT tcompany.name AS company, COUNT(*) AS nb FROM tincidents, tcompany, tusers WHERE tcompany.id=tusers.company AND tusers.id=tincidents.user AND tincidents.disable='0' AND tusers.company!='0' AND tincidents.type LIKE '%' AND tincidents.criticality like '%' AND tincidents.u_service LIKE '%' AND tincidents.state LIKE '%' AND tincidents.category LIKE '%' AND tincidents.date_create LIKE '%-08-%' AND tincidents.date_create LIKE '2023-%' AND tincidents.technician LIKE '%' GROUP BY tcompany.name ORDER BY nb DESC
SELECT tcompany.name AS company, COUNT(*) AS nb FROM tincidents, tcompany, tusers WHERE tcompany.id=tusers.company AND tusers.id=tincidents.user AND tincidents.disable='0' AND tusers.company!='0' AND tincidents.type LIKE '%' AND tincidents.criticality like '%' AND tincidents.u_service LIKE '%' AND tincidents.state LIKE '%' AND tincidents.category LIKE '%' AND tincidents.date_create LIKE '%-08-%' AND tincidents.date_create LIKE '2023-%' AND tincidents.technician LIKE '%' GROUP BY tcompany.name ORDER BY nb DESC
SELECT tcategory.name AS technicien, ((SUM(tincidents.time_hope)-SUM(tincidents.time)))/60 AS time FROM `tincidents` INNER JOIN tcategory ON (tincidents.category=tcategory.id ) WHERE tincidents.technician LIKE '%' AND tincidents.type LIKE '%' AND tincidents.u_service LIKE '%' AND tincidents.state LIKE '%' AND criticality like '%' AND tincidents.category LIKE '%' AND tincidents.disable='0' AND tincidents.time_hope-tincidents.time > 0 AND (tincidents.state='1' OR tincidents.state='2' OR tincidents.state='6' ) GROUP BY tcategory.name ORDER BY time DESC
Délais moyen de résolution
SELECT tusers.firstname, tusers.lastname, ROUND(AVG(TO_DAYS(date_res) - TO_DAYS(date_create))) as jour FROM tincidents INNER JOIN tusers ON (tincidents.technician=tusers.id ) WHERE tincidents.technician NOT LIKE '0' AND tincidents.date_res NOT LIKE '0000-00-00' AND tincidents.date_create NOT LIKE '0000-00-00' AND tincidents.state='3' AND tincidents.type LIKE '%' AND tincidents.criticality like '%' AND tincidents.u_service LIKE '%' AND tincidents.state LIKE '%' AND tincidents.category LIKE '%' AND tincidents.date_create LIKE '%-08-%' AND tincidents.date_create LIKE '2023-%' AND tincidents.disable='0' GROUP BY tincidents.technician ORDER BY jour ASC
Techniciens jours
Tickets par priorité
SELECT tpriority.name, count(*) AS number FROM tincidents INNER JOIN tpriority ON (tincidents.priority=tpriority.id ) WHERE tincidents.disable='0' AND tincidents.technician LIKE '%' AND tincidents.type LIKE '%' AND tincidents.criticality like '%' AND tincidents.u_service LIKE '%' AND tincidents.state LIKE '%' AND tincidents.category LIKE '%' AND tincidents.date_create LIKE '%-08-%' AND tincidents.date_create LIKE '2023-%' GROUP BY tincidents.priority ORDER BY tpriority.number ASC
Priorité Tickets
Très basse 3
Top 10 des demandeurs
SELECT tusers.firstname AS Util, tusers.lastname, count(*) AS demandes FROM tincidents INNER JOIN tusers ON (tincidents.user=tusers.id ) WHERE tincidents.disable='0' AND tincidents.type LIKE '%' AND tincidents.criticality like '%' AND tincidents.u_service LIKE '%' AND tincidents.state LIKE '%' AND tincidents.category LIKE '%' AND tincidents.date_create LIKE '%-08-%' AND tincidents.date_create LIKE '2023-%' GROUP BY tincidents.user ORDER BY demandes DESC LIMIT 10
Utilisateurs Tickets
X 1
X 1
X 1
TOP 10 demandeurs de temps
SELECT tusers.firstname AS Util, tusers.lastname, sum(time) AS temps FROM tincidents INNER JOIN tusers ON (tincidents.user=tusers.id) WHERE tincidents.time NOT LIKE '0' AND tincidents.time NOT LIKE '0' AND tincidents.disable='0' AND tincidents.type LIKE '%' AND tincidents.criticality like '%' AND tincidents.category LIKE '%' AND tincidents.date_create LIKE '%-08-%' AND tincidents.date_create LIKE '2023-%' AND tincidents.u_service LIKE '%' AND tincidents.state LIKE '%' GROUP BY tincidents.user ORDER BY sum(time) DESC limit 10
Utilisateurs Heures
X 0 h
Xl 0 h
X 0 h
Top jour de la semaine
SELECT DAYOFWEEK(`date_create`) AS day,COUNT(`id`) AS ticket_number FROM `tincidents` WHERE date_create!='0000-00-00 00:00:00' AND disable='0' AND tincidents.type LIKE '%' AND tincidents.criticality like '%' AND tincidents.category LIKE '%' AND tincidents.date_create LIKE '%-08-%' AND tincidents.date_create LIKE '2023-%' AND tincidents.u_service LIKE '%' AND tincidents.state LIKE '%' GROUP BY DAYOFWEEK(date_create) ORDER BY FIELD(day,'1'), day ;
jour Tickets
Mardi 3
Répartition des temps par statuts
SELECT tthreads.id, tthreads.date, tthreads.type, tthreads.state FROM tthreads INNER JOIN tincidents ON tincidents.id=tthreads.ticket WHERE tincidents.technician LIKE '%' AND tthreads.ticket=1041 AND tthreads.type!=0 AND tthreads.type!=3 AND tthreads.type!=2 ORDER BY tthreads.id
ANALYSE TICKET: 1041 THREAD=11455: 2023-06-02 10:16:38 type 1 state 0 [ATTRIBUTION 1]
ANALYSE TICKET: 1041 THREAD=11456: 2023-06-02 10:16:38 type 5 state 1
ANALYSE TICKET: 1041 THREAD=11516: 2023-06-05 11:10:59 type 5 state 2 [WAIT TECH 2_4]
ANALYSE TICKET: 1041 THREAD=12352: 2023-08-02 11:41:05 type 4 state 0 [CURRENT 30_90]
SELECT tthreads.id, tthreads.date, tthreads.type, tthreads.state FROM tthreads INNER JOIN tincidents ON tincidents.id=tthreads.ticket WHERE tincidents.technician LIKE '%' AND tthreads.ticket=1116 AND tthreads.type!=0 AND tthreads.type!=3 AND tthreads.type!=2 ORDER BY tthreads.idANALYSE TICKET: 1116 THREAD=12338: 2023-08-01 08:59:49 type 5 state 5
SELECT tthreads.id, tthreads.date, tthreads.type, tthreads.state FROM tthreads INNER JOIN tincidents ON tincidents.id=tthreads.ticket WHERE tincidents.technician LIKE '%' AND tthreads.ticket=1117 AND tthreads.type!=0 AND tthreads.type!=3 AND tthreads.type!=2 ORDER BY tthreads.idANALYSE TICKET: 1117 THREAD=12339: 2023-08-01 11:14:36 type 1 state 0 [ATTRIBUTION 1]
ANALYSE TICKET: 1117 THREAD=12340: 2023-08-01 11:14:36 type 5 state 6
SELECT tthreads.id, tthreads.date, tthreads.type, tthreads.state FROM tthreads INNER JOIN tincidents ON tincidents.id=tthreads.ticket WHERE tincidents.technician LIKE '%' AND tthreads.ticket=1118 AND tthreads.type!=0 AND tthreads.type!=3 AND tthreads.type!=2 ORDER BY tthreads.idANALYSE TICKET: 1118 THREAD=12344: 2023-08-01 11:25:53 type 5 state 5 [WAIT USER 1]
Ticket analysed: 4
TOTAL
ANALYSE TICKET: 1041 day 62 [CLOSE 30_90]
États Inférieur 1 jour 2 à 4 jours 5 à 10 jours 10 à 30 jours 30 à 90 jours Plus de 90 jours
Temps passé Non attribué 100% (2 tickets) 0% (0 tickets) 0% (0 tickets) 0% (0 tickets) 0% (0 tickets) 0% (0 tickets)
Temps passé Attente PEC 0% (0 tickets) 100% (1 tickets) 0% (0 tickets) 0% (0 tickets) 0% (0 tickets) 0% (0 tickets)
Temps passé En cours 0% (0 tickets) 0% (0 tickets) 0% (0 tickets) 0% (0 tickets) 100% (1 tickets) 0% (0 tickets)
Temps passé Attente retour 100% (1 tickets) 0% (0 tickets) 0% (0 tickets) 0% (0 tickets) 0% (0 tickets) 0% (0 tickets)
Temps total de traitement 0% (0 tickets) 0% (0 tickets) 0% (0 tickets) 0% (0 tickets) 100% (1 tickets) 0% (0 tickets)
Re: Erreur export CSV Statistiques
Posté : mer. 2 août 2023 16:22
par Flox
Aucune erreur semble s'afficher, lors de l'affichage de la page statistiques, si l'utilisateur à le droit "stat", un jeton est généré dans la table token, il semblerai qu'il ne soit pas généré dans votre cas, car l'impression d'écran du token transmises concerne les tickets.
Pouvez-vous rafraichir la page statistiques sans lancer l'export puis consulter le dernier token en base de données et transmettre une impression écran
Re: Erreur export CSV Statistiques
Posté : mer. 2 août 2023 16:41
par tcolin
Je suis connecté en tant qu'administrateur et ce profil à le droit "stat" pour afficher les statistiques
Je viens d'en générer 1, je n'avais juste pas filtrer par date... sorry
Re: Erreur export CSV Statistiques
Posté : mer. 2 août 2023 16:45
par Flox
A priori l'adresse ip du client n'est pas correctement renseignée en base de données il s'agit pourtant de la variable $_SERVER['REMOTE_ADDR'] qui est utilisé dans la section système > client.
Pouvez-vous indiquer la version affichée dans le fichier /stat.php
Ainsi que le bloc "generate stat token access"