16:36.md
@ -1,111 +0,0 @@
|
||||
TICKET: T0167 - Pb d'affaire/chantier/partie dans un programme d'essai
|
||||
Date d'extraction: 2025-04-03 15:34:20
|
||||
Nombre de messages: 5
|
||||
|
||||
================================================================================
|
||||
|
||||
********************************************************************************
|
||||
*** MESSAGE TRANSFÉRÉ ***
|
||||
********************************************************************************
|
||||
|
||||
DATE: 2020-04-27 06:20:22
|
||||
DE: Youness BENDEQ
|
||||
OBJET: Pb d'affaire/chantier/partie dans un programme d'essai
|
||||
|
||||
\-------- Message transféré -------- Sujet : | De retour !
|
||||
---|---
|
||||
Date : | Mon, 20 Apr 2020 14:52:05 +0000
|
||||
De : | LENEVEU Guillaume [<Guillaume.LENEVEU@calvados.fr>](mailto:Guillaume.LENEVEU@calvados.fr)
|
||||
Pour : | Youness BENDEQ [<youness.bendeq@cbao.fr>](mailto:youness.bendeq@cbao.fr)
|
||||
|
||||
Bonjour Youness,
|
||||
|
||||
J’espère que tu vas bien ainsi que toute l’équipe BRG-LAB.
|
||||
|
||||
Je viens vers toi car Mr NOVO m’a fait remonter un léger beug sur le numéro d’échantillon B2020-0001 (Voir PJ). En effet, il n’arrive pas à mettre le nom de la partie dans la partie ( en rouge sur la PJ). Il faudrait mettre « joint de chaussée côté giberville » comme stipulé dans le numéro d’affaire -> 20017 SETR -> LIAISON RD403 – RD402 DESSERTE PORTUAIRE VIADUC -> JOINT DE CHAUSSEE COTE GIBERVILLE.
|
||||
|
||||
J’ai essayé de modifié la partie mais je n’y arrive pas.
|
||||
|
||||
Merci de ta réponse.
|
||||
|
||||
Bonne fin de journée.
|
||||
|
||||
**Cordialement,
|
||||
|
||||
**
|
||||
|
||||
**Guillaume LENEVEU**
|
||||
|
||||
DGA Aménagement et Environnement Direction de l’eau et des Risques Adjoint au Chef du service Laboratoire Routes et Matériaux 24 rue des Monts Panneaux ZI Ouest
|
||||
|
||||
14650 Carpiquet
|
||||
|
||||
**Tél.** 02 31 26 52 62
|
||||
|
||||
**Port.** 06 11 39 10 60
|
||||
|
||||
**Fax.** 02 31 26 99 38 **Mail.**_[guillaume.leneveu@calvados.fr](mailto:guillaume.leneveu@calvados.fr)
|
||||
|
||||
_
|
||||
|
||||

|
||||
|
||||
|
||||
**************************************************************************************************
|
||||
« Cette transmission contient des informations confidentielles et/ou personnelles
|
||||
appartenant au conseil départemental du Calvados pour être utilisées exclusivement par le
|
||||
destinataire. Toute utilisation, reproduction, publication, diffusion en l'état ou
|
||||
partiellement par une autre personne que le destinataire est interdite, sauf autorisation
|
||||
expresse du conseil départemental du Calvados. En cas d'erreur de transmission, merci de
|
||||
détruire le(s) document(s) reçu(s). Le conseil départemental du Calvados n'est pas
|
||||
responsable des virus, altérations, falsifications.
|
||||
Droits réservés - conseil départemental du Calvados».
|
||||
**************************************************************************************************
|
||||
|
||||
---
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
********************************************************************************
|
||||
*** CHANGEMENT D'ÉTAT ***
|
||||
********************************************************************************
|
||||
|
||||
DATE: 2020-04-27 06:21:37
|
||||
DE: OdooBot
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
********************************************************************************
|
||||
*** CHANGEMENT D'ÉTAT ***
|
||||
********************************************************************************
|
||||
|
||||
DATE: 2020-04-27 07:19:57
|
||||
DE: Youness BENDEQ
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
********************************************************************************
|
||||
*** CHANGEMENT D'ÉTAT ***
|
||||
********************************************************************************
|
||||
|
||||
DATE: 2020-04-27 07:20:20
|
||||
DE: Youness BENDEQ
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
********************************************************************************
|
||||
*** CHANGEMENT D'ÉTAT ***
|
||||
********************************************************************************
|
||||
|
||||
DATE: 2020-04-27 07:24:40
|
||||
DE: Youness BENDEQ
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
Before Width: | Height: | Size: 249 KiB |
|
Before Width: | Height: | Size: 24 KiB |
@ -1,38 +0,0 @@
|
||||
[
|
||||
{
|
||||
"id": 32382,
|
||||
"name": "Problème partie.png",
|
||||
"mimetype": "image/png",
|
||||
"file_size": 255246,
|
||||
"create_date": "2020-04-27 06:21:36",
|
||||
"create_uid": [
|
||||
1,
|
||||
"OdooBot"
|
||||
],
|
||||
"description": "Problème partie.png",
|
||||
"res_name": "[T0167] Pb d'affaire/chantier/partie dans un programme d'essai",
|
||||
"creator_name": "OdooBot",
|
||||
"creator_id": 1,
|
||||
"download_status": "success",
|
||||
"local_path": "output/ticket_T0167/T0167_20250403_153418/attachments/Problème partie.png",
|
||||
"error": ""
|
||||
},
|
||||
{
|
||||
"id": 32380,
|
||||
"name": "image001.png",
|
||||
"mimetype": "image/png",
|
||||
"file_size": 25085,
|
||||
"create_date": "2020-04-27 06:21:36",
|
||||
"create_uid": [
|
||||
1,
|
||||
"OdooBot"
|
||||
],
|
||||
"description": "image001.png",
|
||||
"res_name": "[T0167] Pb d'affaire/chantier/partie dans un programme d'essai",
|
||||
"creator_name": "OdooBot",
|
||||
"creator_id": 1,
|
||||
"download_status": "success",
|
||||
"local_path": "output/ticket_T0167/T0167_20250403_153418/attachments/image001.png",
|
||||
"error": ""
|
||||
}
|
||||
]
|
||||
@ -1,13 +0,0 @@
|
||||
{
|
||||
"timestamp": "20250403_153418",
|
||||
"ticket_code": "T0167",
|
||||
"output_directory": "output/ticket_T0167/T0167_20250403_153418",
|
||||
"message_count": 5,
|
||||
"attachment_count": 2,
|
||||
"files_created": [
|
||||
"ticket_info.json",
|
||||
"ticket_summary.json",
|
||||
"all_messages.json",
|
||||
"structure.json"
|
||||
]
|
||||
}
|
||||
@ -1,9 +0,0 @@
|
||||
[
|
||||
{
|
||||
"id": 10972,
|
||||
"partner_id": [
|
||||
8504,
|
||||
"CONSEIL DEPARTEMENTAL DU CALVADOS (14), Guillaume LENEVEU"
|
||||
]
|
||||
}
|
||||
]
|
||||
@ -1,20 +0,0 @@
|
||||
{
|
||||
"date_extraction": "2025-04-03T15:34:20.622327",
|
||||
"ticket_id": 179,
|
||||
"ticket_code": "T0167",
|
||||
"ticket_name": "Pb d'affaire/chantier/partie dans un programme d'essai",
|
||||
"output_dir": "output/ticket_T0167/T0167_20250403_153418",
|
||||
"files": {
|
||||
"ticket_info": "ticket_info.json",
|
||||
"ticket_summary": "ticket_summary.json",
|
||||
"messages": "all_messages.json",
|
||||
"messages_raw": "messages_raw.json",
|
||||
"messages_text": "all_messages.txt",
|
||||
"attachments": "attachments_info.json",
|
||||
"followers": "followers.json"
|
||||
},
|
||||
"stats": {
|
||||
"messages_count": 5,
|
||||
"attachments_count": 2
|
||||
}
|
||||
}
|
||||
@ -1,57 +0,0 @@
|
||||
{
|
||||
"id": 179,
|
||||
"name": "Pb d'affaire/chantier/partie dans un programme d'essai",
|
||||
"description": "<p>Je viens vers toi car Mr NOVO m’a fait remonter un léger beug sur le numéro d’échantillon B2020-0001 (Voir PJ).</p><p>En effet, il n’arrive pas à mettre le nom de la partie dans la partie ( en rouge sur la PJ). Il faudrait mettre « joint de chaussée côté giberville » comme stipulé dans le numéro d’affaire -> 20017 SETR -> LIAISON RD403 – RD402 DESSERTE PORTUAIRE VIADUC -> JOINT DE CHAUSSEE COTE GIBERVILLE.</p><p>J’ai essayé de modifié la partie mais je n’y arrive pas.</p>",
|
||||
"stage_id": [
|
||||
8,
|
||||
"Clôturé"
|
||||
],
|
||||
"project_id": [
|
||||
3,
|
||||
"Demandes"
|
||||
],
|
||||
"partner_id": [
|
||||
8504,
|
||||
"CONSEIL DEPARTEMENTAL DU CALVADOS (14), Guillaume LENEVEU"
|
||||
],
|
||||
"user_id": [
|
||||
9,
|
||||
"Youness BENDEQ"
|
||||
],
|
||||
"date_start": "2020-04-20 14:52:00",
|
||||
"date_end": false,
|
||||
"date_deadline": false,
|
||||
"create_date": "2020-04-27 06:21:36",
|
||||
"write_date": "2024-10-03 13:10:50",
|
||||
"tag_ids": [
|
||||
15
|
||||
],
|
||||
"priority": "0",
|
||||
"email_from": "guillaume.leneveu@calvados.fr",
|
||||
"email_cc": "",
|
||||
"message_ids": [
|
||||
11346,
|
||||
11345,
|
||||
11344,
|
||||
11343,
|
||||
11342,
|
||||
11335,
|
||||
11334,
|
||||
11333,
|
||||
11332
|
||||
],
|
||||
"message_follower_ids": [
|
||||
10972
|
||||
],
|
||||
"timesheet_ids": [
|
||||
51
|
||||
],
|
||||
"attachment_ids": [],
|
||||
"stage_id_name": "Clôturé",
|
||||
"project_id_name": "Demandes",
|
||||
"partner_id_name": "CONSEIL DEPARTEMENTAL DU CALVADOS (14), Guillaume LENEVEU",
|
||||
"user_id_name": "Youness BENDEQ",
|
||||
"tag_names": [
|
||||
"BRG-LAB WEB"
|
||||
]
|
||||
}
|
||||
@ -1,16 +0,0 @@
|
||||
{
|
||||
"id": 179,
|
||||
"code": "T0167",
|
||||
"name": "Pb d'affaire/chantier/partie dans un programme d'essai",
|
||||
"description": "<p>Je viens vers toi car Mr NOVO m’a fait remonter un léger beug sur le numéro d’échantillon B2020-0001 (Voir PJ).</p><p>En effet, il n’arrive pas à mettre le nom de la partie dans la partie ( en rouge sur la PJ). Il faudrait mettre « joint de chaussée côté giberville » comme stipulé dans le numéro d’affaire -> 20017 SETR -> LIAISON RD403 – RD402 DESSERTE PORTUAIRE VIADUC -> JOINT DE CHAUSSEE COTE GIBERVILLE.</p><p>J’ai essayé de modifié la partie mais je n’y arrive pas.</p>",
|
||||
"stage": "Clôturé",
|
||||
"project": "Demandes",
|
||||
"partner": "CONSEIL DEPARTEMENTAL DU CALVADOS (14), Guillaume LENEVEU",
|
||||
"assigned_to": "Youness BENDEQ",
|
||||
"tags": [
|
||||
"BRG-LAB WEB"
|
||||
],
|
||||
"create_date": "2020-04-27 06:21:36",
|
||||
"write_date": "2024-10-03 13:10:50",
|
||||
"deadline": false
|
||||
}
|
||||
@ -1,111 +0,0 @@
|
||||
TICKET: T0167 - Pb d'affaire/chantier/partie dans un programme d'essai
|
||||
Date d'extraction: 2025-04-03 15:37:15
|
||||
Nombre de messages: 5
|
||||
|
||||
================================================================================
|
||||
|
||||
********************************************************************************
|
||||
*** MESSAGE TRANSFÉRÉ ***
|
||||
********************************************************************************
|
||||
|
||||
DATE: 2020-04-27 06:20:22
|
||||
DE: Youness BENDEQ
|
||||
OBJET: Pb d'affaire/chantier/partie dans un programme d'essai
|
||||
|
||||
\-------- Message transféré -------- Sujet : | De retour !
|
||||
---|---
|
||||
Date : | Mon, 20 Apr 2020 14:52:05 +0000
|
||||
De : | LENEVEU Guillaume [<Guillaume.LENEVEU@calvados.fr>](mailto:Guillaume.LENEVEU@calvados.fr)
|
||||
Pour : | Youness BENDEQ [<youness.bendeq@cbao.fr>](mailto:youness.bendeq@cbao.fr)
|
||||
|
||||
Bonjour Youness,
|
||||
|
||||
J’espère que tu vas bien ainsi que toute l’équipe BRG-LAB.
|
||||
|
||||
Je viens vers toi car Mr NOVO m’a fait remonter un léger beug sur le numéro d’échantillon B2020-0001 (Voir PJ). En effet, il n’arrive pas à mettre le nom de la partie dans la partie ( en rouge sur la PJ). Il faudrait mettre « joint de chaussée côté giberville » comme stipulé dans le numéro d’affaire -> 20017 SETR -> LIAISON RD403 – RD402 DESSERTE PORTUAIRE VIADUC -> JOINT DE CHAUSSEE COTE GIBERVILLE.
|
||||
|
||||
J’ai essayé de modifié la partie mais je n’y arrive pas.
|
||||
|
||||
Merci de ta réponse.
|
||||
|
||||
Bonne fin de journée.
|
||||
|
||||
**Cordialement,
|
||||
|
||||
**
|
||||
|
||||
**Guillaume LENEVEU**
|
||||
|
||||
DGA Aménagement et Environnement Direction de l’eau et des Risques Adjoint au Chef du service Laboratoire Routes et Matériaux 24 rue des Monts Panneaux ZI Ouest
|
||||
|
||||
14650 Carpiquet
|
||||
|
||||
**Tél.** 02 31 26 52 62
|
||||
|
||||
**Port.** 06 11 39 10 60
|
||||
|
||||
**Fax.** 02 31 26 99 38 **Mail.**_[guillaume.leneveu@calvados.fr](mailto:guillaume.leneveu@calvados.fr)
|
||||
|
||||
_
|
||||
|
||||

|
||||
|
||||
|
||||
**************************************************************************************************
|
||||
« Cette transmission contient des informations confidentielles et/ou personnelles
|
||||
appartenant au conseil départemental du Calvados pour être utilisées exclusivement par le
|
||||
destinataire. Toute utilisation, reproduction, publication, diffusion en l'état ou
|
||||
partiellement par une autre personne que le destinataire est interdite, sauf autorisation
|
||||
expresse du conseil départemental du Calvados. En cas d'erreur de transmission, merci de
|
||||
détruire le(s) document(s) reçu(s). Le conseil départemental du Calvados n'est pas
|
||||
responsable des virus, altérations, falsifications.
|
||||
Droits réservés - conseil départemental du Calvados».
|
||||
**************************************************************************************************
|
||||
|
||||
---
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
********************************************************************************
|
||||
*** CHANGEMENT D'ÉTAT ***
|
||||
********************************************************************************
|
||||
|
||||
DATE: 2020-04-27 06:21:37
|
||||
DE: OdooBot
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
********************************************************************************
|
||||
*** CHANGEMENT D'ÉTAT ***
|
||||
********************************************************************************
|
||||
|
||||
DATE: 2020-04-27 07:19:57
|
||||
DE: Youness BENDEQ
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
********************************************************************************
|
||||
*** CHANGEMENT D'ÉTAT ***
|
||||
********************************************************************************
|
||||
|
||||
DATE: 2020-04-27 07:20:20
|
||||
DE: Youness BENDEQ
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
********************************************************************************
|
||||
*** CHANGEMENT D'ÉTAT ***
|
||||
********************************************************************************
|
||||
|
||||
DATE: 2020-04-27 07:24:40
|
||||
DE: Youness BENDEQ
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
Before Width: | Height: | Size: 249 KiB |
|
Before Width: | Height: | Size: 24 KiB |
@ -1,38 +0,0 @@
|
||||
[
|
||||
{
|
||||
"id": 32382,
|
||||
"name": "Problème partie.png",
|
||||
"mimetype": "image/png",
|
||||
"file_size": 255246,
|
||||
"create_date": "2020-04-27 06:21:36",
|
||||
"create_uid": [
|
||||
1,
|
||||
"OdooBot"
|
||||
],
|
||||
"description": "Problème partie.png",
|
||||
"res_name": "[T0167] Pb d'affaire/chantier/partie dans un programme d'essai",
|
||||
"creator_name": "OdooBot",
|
||||
"creator_id": 1,
|
||||
"download_status": "success",
|
||||
"local_path": "output/ticket_T0167/T0167_20250403_153713/attachments/Probleme_partie.png",
|
||||
"error": ""
|
||||
},
|
||||
{
|
||||
"id": 32380,
|
||||
"name": "image001.png",
|
||||
"mimetype": "image/png",
|
||||
"file_size": 25085,
|
||||
"create_date": "2020-04-27 06:21:36",
|
||||
"create_uid": [
|
||||
1,
|
||||
"OdooBot"
|
||||
],
|
||||
"description": "image001.png",
|
||||
"res_name": "[T0167] Pb d'affaire/chantier/partie dans un programme d'essai",
|
||||
"creator_name": "OdooBot",
|
||||
"creator_id": 1,
|
||||
"download_status": "success",
|
||||
"local_path": "output/ticket_T0167/T0167_20250403_153713/attachments/image001.png",
|
||||
"error": ""
|
||||
}
|
||||
]
|
||||
@ -1,9 +0,0 @@
|
||||
[
|
||||
{
|
||||
"id": 10972,
|
||||
"partner_id": [
|
||||
8504,
|
||||
"CONSEIL DEPARTEMENTAL DU CALVADOS (14), Guillaume LENEVEU"
|
||||
]
|
||||
}
|
||||
]
|
||||
@ -1,57 +0,0 @@
|
||||
{
|
||||
"id": 179,
|
||||
"name": "Pb d'affaire/chantier/partie dans un programme d'essai",
|
||||
"description": "<p>Je viens vers toi car Mr NOVO m’a fait remonter un léger beug sur le numéro d’échantillon B2020-0001 (Voir PJ).</p><p>En effet, il n’arrive pas à mettre le nom de la partie dans la partie ( en rouge sur la PJ). Il faudrait mettre « joint de chaussée côté giberville » comme stipulé dans le numéro d’affaire -> 20017 SETR -> LIAISON RD403 – RD402 DESSERTE PORTUAIRE VIADUC -> JOINT DE CHAUSSEE COTE GIBERVILLE.</p><p>J’ai essayé de modifié la partie mais je n’y arrive pas.</p>",
|
||||
"stage_id": [
|
||||
8,
|
||||
"Clôturé"
|
||||
],
|
||||
"project_id": [
|
||||
3,
|
||||
"Demandes"
|
||||
],
|
||||
"partner_id": [
|
||||
8504,
|
||||
"CONSEIL DEPARTEMENTAL DU CALVADOS (14), Guillaume LENEVEU"
|
||||
],
|
||||
"user_id": [
|
||||
9,
|
||||
"Youness BENDEQ"
|
||||
],
|
||||
"date_start": "2020-04-20 14:52:00",
|
||||
"date_end": false,
|
||||
"date_deadline": false,
|
||||
"create_date": "2020-04-27 06:21:36",
|
||||
"write_date": "2024-10-03 13:10:50",
|
||||
"tag_ids": [
|
||||
15
|
||||
],
|
||||
"priority": "0",
|
||||
"email_from": "guillaume.leneveu@calvados.fr",
|
||||
"email_cc": "",
|
||||
"message_ids": [
|
||||
11346,
|
||||
11345,
|
||||
11344,
|
||||
11343,
|
||||
11342,
|
||||
11335,
|
||||
11334,
|
||||
11333,
|
||||
11332
|
||||
],
|
||||
"message_follower_ids": [
|
||||
10972
|
||||
],
|
||||
"timesheet_ids": [
|
||||
51
|
||||
],
|
||||
"attachment_ids": [],
|
||||
"stage_id_name": "Clôturé",
|
||||
"project_id_name": "Demandes",
|
||||
"partner_id_name": "CONSEIL DEPARTEMENTAL DU CALVADOS (14), Guillaume LENEVEU",
|
||||
"user_id_name": "Youness BENDEQ",
|
||||
"tag_names": [
|
||||
"BRG-LAB WEB"
|
||||
]
|
||||
}
|
||||
@ -1,16 +0,0 @@
|
||||
{
|
||||
"id": 179,
|
||||
"code": "T0167",
|
||||
"name": "Pb d'affaire/chantier/partie dans un programme d'essai",
|
||||
"description": "<p>Je viens vers toi car Mr NOVO m’a fait remonter un léger beug sur le numéro d’échantillon B2020-0001 (Voir PJ).</p><p>En effet, il n’arrive pas à mettre le nom de la partie dans la partie ( en rouge sur la PJ). Il faudrait mettre « joint de chaussée côté giberville » comme stipulé dans le numéro d’affaire -> 20017 SETR -> LIAISON RD403 – RD402 DESSERTE PORTUAIRE VIADUC -> JOINT DE CHAUSSEE COTE GIBERVILLE.</p><p>J’ai essayé de modifié la partie mais je n’y arrive pas.</p>",
|
||||
"stage": "Clôturé",
|
||||
"project": "Demandes",
|
||||
"partner": "CONSEIL DEPARTEMENTAL DU CALVADOS (14), Guillaume LENEVEU",
|
||||
"assigned_to": "Youness BENDEQ",
|
||||
"tags": [
|
||||
"BRG-LAB WEB"
|
||||
],
|
||||
"create_date": "2020-04-27 06:21:36",
|
||||
"write_date": "2024-10-03 13:10:50",
|
||||
"deadline": false
|
||||
}
|
||||
271
output/ticket_T11081/T11081_20250403_163126/all_messages.json
Normal file
132
output/ticket_T11081/T11081_20250403_163126/all_messages.txt
Normal file
|
After Width: | Height: | Size: 571 KiB |
|
After Width: | Height: | Size: 571 KiB |
|
After Width: | Height: | Size: 328 KiB |
@ -0,0 +1,56 @@
|
||||
[
|
||||
{
|
||||
"id": 144878,
|
||||
"name": "Outlook-evdngl0z.png",
|
||||
"mimetype": "image/png",
|
||||
"file_size": 585071,
|
||||
"create_date": "2025-03-19 14:51:40",
|
||||
"create_uid": [
|
||||
1,
|
||||
"OdooBot"
|
||||
],
|
||||
"description": "Outlook-evdngl0z.png",
|
||||
"res_name": "[T11081] Problème création d'échantillons",
|
||||
"creator_name": "OdooBot",
|
||||
"creator_id": 1,
|
||||
"download_status": "success",
|
||||
"local_path": "output/ticket_T11081/T11081_20250403_163126/attachments/Outlook-evdngl0z.png",
|
||||
"error": ""
|
||||
},
|
||||
{
|
||||
"id": 144861,
|
||||
"name": "erreur bgrlab.png",
|
||||
"mimetype": "image/png",
|
||||
"file_size": 335428,
|
||||
"create_date": "2025-03-19 10:41:35",
|
||||
"create_uid": [
|
||||
1,
|
||||
"OdooBot"
|
||||
],
|
||||
"description": "erreur bgrlab.png",
|
||||
"res_name": "[T11081] Problème création d'échantillons",
|
||||
"creator_name": "OdooBot",
|
||||
"creator_id": 1,
|
||||
"download_status": "success",
|
||||
"local_path": "output/ticket_T11081/T11081_20250403_163126/attachments/erreur_bgrlab.png",
|
||||
"error": ""
|
||||
},
|
||||
{
|
||||
"id": 144859,
|
||||
"name": "Outlook-df0folaj.png",
|
||||
"mimetype": "image/png",
|
||||
"file_size": 585071,
|
||||
"create_date": "2025-03-19 10:41:35",
|
||||
"create_uid": [
|
||||
1,
|
||||
"OdooBot"
|
||||
],
|
||||
"description": "Outlook-df0folaj.png",
|
||||
"res_name": "[T11081] Problème création d'échantillons",
|
||||
"creator_name": "OdooBot",
|
||||
"creator_id": 1,
|
||||
"download_status": "success",
|
||||
"local_path": "output/ticket_T11081/T11081_20250403_163126/attachments/Outlook-df0folaj.png",
|
||||
"error": ""
|
||||
}
|
||||
]
|
||||
58
output/ticket_T11081/T11081_20250403_163126/followers.json
Normal file
@ -0,0 +1,58 @@
|
||||
[
|
||||
{
|
||||
"id": 89662,
|
||||
"partner_id": [
|
||||
28961,
|
||||
"Fabien LAFAY"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 89663,
|
||||
"partner_id": [
|
||||
29025,
|
||||
"Peinda CISS, Peinda CISS"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 89664,
|
||||
"partner_id": [
|
||||
29730,
|
||||
"TOUT FAIRE GEOTECHNIQUE (TFG), Meissa NDIAYE"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 89665,
|
||||
"partner_id": [
|
||||
27747,
|
||||
"TOUT FAIRE GEOTECHNIQUE (TFG), Khadidiatou DIAKHATE"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 89666,
|
||||
"partner_id": [
|
||||
27749,
|
||||
"TOUT FAIRE GEOTECHNIQUE (TFG), Raïssa TENDENG"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 89667,
|
||||
"partner_id": [
|
||||
32339,
|
||||
"Ndeye Aissatou DIENG"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 89687,
|
||||
"partner_id": [
|
||||
32165,
|
||||
"Romuald GRUSON"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 89695,
|
||||
"partner_id": [
|
||||
28931,
|
||||
"TOUT FAIRE GEOTECHNIQUE (TFG), Edouard SYLLA"
|
||||
]
|
||||
}
|
||||
]
|
||||
301
output/ticket_T11081/T11081_20250403_163126/messages_raw.json
Normal file
90
output/ticket_T11081/T11081_20250403_163126/rapport.md
Normal file
@ -0,0 +1,90 @@
|
||||
# Ticket T11081: Problème création d'échantillons
|
||||
|
||||
## Informations du ticket
|
||||
|
||||
- **Code**: T11081
|
||||
- **Nom**: Problème création d'échantillons
|
||||
- **Projet**: Demandes
|
||||
- **État**: Clôturé
|
||||
- **Assigné à**:
|
||||
- **Client**: TOUT FAIRE GEOTECHNIQUE (TFG), Edouard SYLLA, Edouard SYLLA <edouard.sylla@laboratoiretfg.com>
|
||||
- **Créé le**: 19/03/2025 10:41:35
|
||||
- **Dernière modification**: 03/04/2025 07:50:56
|
||||
- **Date limite**: 03/04/2025 00:00:00
|
||||
|
||||
## Messages
|
||||
|
||||
### Message 1
|
||||
**De**: Edouard SYLLA
|
||||
**Date**: 19/03/2025 10:37:27
|
||||
**Type**: E-mail
|
||||
**Sujet**: Problème création d'échantillons
|
||||
|
||||
Bonjour,
|
||||
|
||||
Nous vous informons que depuis ce matin, la plateforme ne donne pas l'accès à la création d'un échantillon.
|
||||
|
||||
Merci de voir en PJ la capture de la notification (image avec cadenas)
|
||||
|
||||
Dans l'attente de votre retour dans les plus brefs délais.
|
||||
|
||||
Cordialement.
|
||||
|
||||
---
|
||||
|
||||
### Message 2
|
||||
**De**: Romuald GRUSON
|
||||
**Date**: 19/03/2025 13:54:04
|
||||
**Type**: E-mail
|
||||
**Sujet**: Re: [T11081] - Problème création d'échantillons
|
||||
|
||||
Bonjour,
|
||||
|
||||
Nous avons rétabli le droit vous permettant de consulter vos essais. Désolé pour le désagrément.
|
||||
|
||||
Je reste à votre entière disposition pour toute information complémentaire.
|
||||
|
||||
Cordialement,
|
||||
|
||||
\---
|
||||
|
||||
---
|
||||
|
||||
### Message 3
|
||||
**De**: Edouard SYLLA
|
||||
**Date**: 19/03/2025 14:46:48
|
||||
**Type**: E-mail
|
||||
**Sujet**: RE: [T11081] - Problème création d'échantillons
|
||||
|
||||
Bonjour,
|
||||
|
||||
Nous vous remercions de la diligence.
|
||||
|
||||
Cordialement.
|
||||
|
||||
**De :** support@cbao.fr **Envoyé :** mercredi 19 mars 2025 14:54 **À :** Edouard SYLLA **Objet :** Re: [T11081] - Problème création d'échantillons
|
||||
|
||||

|
||||
|
||||
Bonjour,
|
||||
|
||||
Nous avons rétabli le droit vous permettant de consulter vos essais. Désolé pour le désagrément.
|
||||
|
||||
Je reste à votre entière disposition pour toute information complémentaire.
|
||||
|
||||
Cordialement,
|
||||
|
||||
\---
|
||||
|
||||
[
|
||||
|
||||
Envoyé par [ CBAO S.A.R.L. ](https://www.cbao.fr).
|
||||
|
||||

|
||||
|
||||
---
|
||||
|
||||
## Informations sur l'extraction
|
||||
|
||||
- **Date d'extraction**: 03/04/2025 16:31:29
|
||||
- **Répertoire**: output/ticket_T11081/T11081_20250403_163126
|
||||
@ -1,9 +1,9 @@
|
||||
{
|
||||
"date_extraction": "2025-04-03T15:37:16.116926",
|
||||
"ticket_id": 179,
|
||||
"ticket_code": "T0167",
|
||||
"ticket_name": "Pb d'affaire/chantier/partie dans un programme d'essai",
|
||||
"output_dir": "output/ticket_T0167/T0167_20250403_153713",
|
||||
"date_extraction": "2025-04-03T16:31:29.565155",
|
||||
"ticket_id": 11060,
|
||||
"ticket_code": "T11081",
|
||||
"ticket_name": "Problème création d'échantillons",
|
||||
"output_dir": "output/ticket_T11081/T11081_20250403_163126",
|
||||
"files": {
|
||||
"ticket_info": "ticket_info.json",
|
||||
"ticket_summary": "ticket_summary.json",
|
||||
@ -14,7 +14,7 @@
|
||||
"followers": "followers.json"
|
||||
},
|
||||
"stats": {
|
||||
"messages_count": 5,
|
||||
"attachments_count": 2
|
||||
"messages_count": 6,
|
||||
"attachments_count": 3
|
||||
}
|
||||
}
|
||||
63
output/ticket_T11081/T11081_20250403_163126/ticket_info.json
Normal file
@ -0,0 +1,63 @@
|
||||
{
|
||||
"id": 11060,
|
||||
"name": "Problème création d'échantillons",
|
||||
"description": "<p><br></p>",
|
||||
"stage_id": [
|
||||
8,
|
||||
"Clôturé"
|
||||
],
|
||||
"project_id": [
|
||||
3,
|
||||
"Demandes"
|
||||
],
|
||||
"partner_id": [
|
||||
28931,
|
||||
"TOUT FAIRE GEOTECHNIQUE (TFG), Edouard SYLLA"
|
||||
],
|
||||
"user_id": [
|
||||
32,
|
||||
"Romuald GRUSON"
|
||||
],
|
||||
"date_start": "2025-03-19 10:41:35",
|
||||
"date_end": false,
|
||||
"date_deadline": "2025-04-03",
|
||||
"create_date": "2025-03-19 10:41:35",
|
||||
"write_date": "2025-04-03 07:50:56",
|
||||
"tag_ids": [
|
||||
15
|
||||
],
|
||||
"priority": "0",
|
||||
"email_from": "Edouard SYLLA <edouard.sylla@laboratoiretfg.com>",
|
||||
"email_cc": "Ndeye Aissatou DIENG <ndeyeaissatou.dieng@laboratoiretfg.com>, Raissa\n TENDENG <raissa.tendeng@laboratoiretfg.com>, \"Khadidiatou DIAKHATE\"\n\t<khadidiatou.diakhate@laboratoiretfg.com>, \"Fatoumata CISSOKHO\"\n\t<fatoumata.cissokho@laboratoiretfg.com>, Peinda CISS\n\t<peindasow.ciss@laboratoiretfg.com>, Meissa NDIAYE\n\t<meissa.ndiaye@laboratoiretfg.com>",
|
||||
"message_ids": [
|
||||
228929,
|
||||
228000,
|
||||
227989,
|
||||
227988,
|
||||
227987,
|
||||
227930,
|
||||
227891,
|
||||
227890,
|
||||
227889,
|
||||
227888
|
||||
],
|
||||
"message_follower_ids": [
|
||||
89662,
|
||||
89663,
|
||||
89664,
|
||||
89665,
|
||||
89666,
|
||||
89667,
|
||||
89687,
|
||||
89695
|
||||
],
|
||||
"timesheet_ids": [],
|
||||
"attachment_ids": [],
|
||||
"stage_id_name": "Clôturé",
|
||||
"project_id_name": "Demandes",
|
||||
"partner_id_name": "TOUT FAIRE GEOTECHNIQUE (TFG), Edouard SYLLA",
|
||||
"user_id_name": "Romuald GRUSON",
|
||||
"tag_names": [
|
||||
"BRG-LAB WEB"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
{
|
||||
"id": 11060,
|
||||
"code": "T11081",
|
||||
"name": "Problème création d'échantillons",
|
||||
"description": "<p><br></p>",
|
||||
"stage": "Clôturé",
|
||||
"project": "Demandes",
|
||||
"partner": "TOUT FAIRE GEOTECHNIQUE (TFG), Edouard SYLLA",
|
||||
"assigned_to": "Romuald GRUSON",
|
||||
"tags": [
|
||||
"BRG-LAB WEB"
|
||||
],
|
||||
"create_date": "2025-03-19 10:41:35",
|
||||
"write_date": "2025-04-03 07:50:56",
|
||||
"deadline": "2025-04-03"
|
||||
}
|
||||
@ -12,6 +12,7 @@ from datetime import datetime
|
||||
from utils.auth_manager import AuthManager
|
||||
from utils.ticket_manager import TicketManager
|
||||
from utils.utils import setup_logging, log_separator
|
||||
from utils.json_to_markdown import create_markdown_from_json
|
||||
|
||||
def parse_arguments():
|
||||
"""Parse les arguments de ligne de commande."""
|
||||
@ -20,6 +21,7 @@ def parse_arguments():
|
||||
parser.add_argument("--output", "-o", help="Répertoire de sortie", default=None)
|
||||
parser.add_argument("--config", "-c", help="Fichier de configuration", default="config.json")
|
||||
parser.add_argument("--verbose", "-v", action="store_true", help="Mode verbeux")
|
||||
parser.add_argument("--no-md", action="store_true", help="Désactiver la génération automatique du fichier Markdown")
|
||||
return parser.parse_args()
|
||||
|
||||
def load_config(config_file):
|
||||
@ -97,12 +99,27 @@ def main():
|
||||
]
|
||||
}
|
||||
|
||||
# Générer automatiquement le fichier Markdown si demandé
|
||||
md_file_path = None
|
||||
if not args.no_md:
|
||||
json_file = result.get("messages_file", "")
|
||||
if json_file and os.path.exists(json_file):
|
||||
md_file_path = os.path.join(ticket_dir, "rapport.md")
|
||||
print(f"Génération du rapport Markdown...")
|
||||
if create_markdown_from_json(json_file, md_file_path):
|
||||
print(f"Rapport Markdown créé: {md_file_path}")
|
||||
summary["files_created"].append("rapport.md")
|
||||
else:
|
||||
print("Échec de la génération du rapport Markdown")
|
||||
|
||||
# Afficher le résumé
|
||||
print("\nExtraction terminée avec succès")
|
||||
print(f"Ticket: {args.ticket_code}")
|
||||
print(f"Répertoire: {ticket_dir}")
|
||||
print(f"Messages traités: {result.get('messages_count', 0)}")
|
||||
print(f"Pièces jointes: {result.get('attachments_count', 0)}")
|
||||
if md_file_path:
|
||||
print(f"Rapport Markdown: {md_file_path}")
|
||||
|
||||
except Exception as e:
|
||||
print(f"Une erreur est survenue: {e}")
|
||||
|
||||
BIN
utils/__pycache__/json_to_markdown.cpython-312.pyc
Normal file
394
utils/json_to_markdown.py
Normal file
@ -0,0 +1,394 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Script pour convertir les fichiers JSON de tickets en Markdown formaté.
|
||||
Ce script prend les données JSON des tickets extraits et crée un fichier Markdown structuré.
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
import argparse
|
||||
from datetime import datetime
|
||||
|
||||
def clean_html(html_content):
|
||||
"""
|
||||
Nettoie le contenu HTML pour le Markdown.
|
||||
Supprime les balises, les bas de page, les messages automatiques et les sections vides.
|
||||
"""
|
||||
if not html_content:
|
||||
return ""
|
||||
|
||||
import re
|
||||
|
||||
# Supprimer les balises simples
|
||||
html_content = re.sub(r'<br\s*/?>|<p>|</p>|<div>|</div>', '\n', html_content)
|
||||
|
||||
# Supprimer les bas de page et messages automatiques du support
|
||||
html_content = re.sub(r'Droit à la déconnexion :.*?(?=\n\n|\Z)', '', html_content, flags=re.DOTALL)
|
||||
html_content = re.sub(r'\*\s*\*\s*\*.*?(?=\n\n|\Z)', '', html_content, flags=re.DOTALL)
|
||||
html_content = re.sub(r'Ce message électronique et tous les fichiers.*?(?=\n\n|\Z)', '', html_content, flags=re.DOTALL)
|
||||
html_content = re.sub(r'Afin d\'assurer une meilleure traçabilité.*?(?=\n\n|\Z)', '', html_content, flags=re.DOTALL)
|
||||
html_content = re.sub(r'_Confidentialité :.*?(?=\n\n|\Z)', '', html_content, flags=re.DOTALL)
|
||||
html_content = re.sub(r'Support technique.*?(?=\n\n|\Z)', '', html_content, flags=re.DOTALL)
|
||||
|
||||
# Suppression de l'image signature CBAO et autres images
|
||||
html_content = re.sub(r'!\[CBAO - développeur de rentabilité.*?(?=\n\n|\Z)', '', html_content, flags=re.DOTALL)
|
||||
html_content = re.sub(r'!\[.*?\]\(/web/image/.*?\)', '', html_content)
|
||||
html_content = re.sub(r'!\[cid:.*?\]\(/web/image/.*?\)', '', html_content)
|
||||
|
||||
# Supprimer les balises HTML restantes
|
||||
html_content = re.sub(r'<.*?>', '', html_content)
|
||||
|
||||
# Remplacer les entités HTML courantes
|
||||
html_content = html_content.replace(' ', ' ')
|
||||
html_content = html_content.replace('<', '<')
|
||||
html_content = html_content.replace('>', '>')
|
||||
html_content = html_content.replace('&', '&')
|
||||
html_content = html_content.replace('"', '"')
|
||||
|
||||
# Supprimer les lignes avec uniquement des **
|
||||
html_content = re.sub(r'^\s*\*\*\s*\*\*\s*$', '', html_content, flags=re.MULTILINE)
|
||||
html_content = re.sub(r'^\s*\*\*\s*$', '', html_content, flags=re.MULTILINE)
|
||||
|
||||
# Supprimer le \--- à la fin des messages
|
||||
html_content = re.sub(r'\\---\s*$', '', html_content)
|
||||
|
||||
# Supprimer les crochets isolés
|
||||
html_content = re.sub(r'\[\s*$', '', html_content)
|
||||
|
||||
# Supprimer les lignes vides multiples
|
||||
html_content = re.sub(r'\n\s*\n', '\n\n', html_content)
|
||||
|
||||
# Nettoyer au début et à la fin
|
||||
html_content = html_content.strip()
|
||||
|
||||
# Supprimer les sections vides (comme "*Contenu vide*")
|
||||
if not html_content or html_content.lower() == "*contenu vide*":
|
||||
return "*Contenu vide*"
|
||||
|
||||
return html_content
|
||||
|
||||
def format_date(date_str):
|
||||
"""
|
||||
Formate une date ISO en format lisible.
|
||||
"""
|
||||
if not date_str:
|
||||
return ""
|
||||
|
||||
try:
|
||||
dt = datetime.fromisoformat(date_str.replace('Z', '+00:00'))
|
||||
return dt.strftime("%d/%m/%Y %H:%M:%S")
|
||||
except (ValueError, TypeError):
|
||||
return date_str
|
||||
|
||||
def create_markdown_from_json(json_file, output_file):
|
||||
"""
|
||||
Crée un fichier Markdown à partir d'un fichier JSON de messages.
|
||||
|
||||
Args:
|
||||
json_file: Chemin vers le fichier JSON contenant les messages
|
||||
output_file: Chemin du fichier Markdown à créer
|
||||
"""
|
||||
try:
|
||||
with open(json_file, 'r', encoding='utf-8') as f:
|
||||
data = json.load(f)
|
||||
except Exception as e:
|
||||
print(f"Erreur : {e}")
|
||||
return False
|
||||
|
||||
# Obtenir le répertoire du ticket pour accéder aux autres fichiers
|
||||
ticket_dir = os.path.dirname(json_file)
|
||||
|
||||
# Essayer de lire le fichier ticket_info.json si disponible
|
||||
ticket_info = {}
|
||||
ticket_info_path = os.path.join(ticket_dir, "ticket_info.json")
|
||||
if os.path.exists(ticket_info_path):
|
||||
try:
|
||||
with open(ticket_info_path, 'r', encoding='utf-8') as f:
|
||||
ticket_info = json.load(f)
|
||||
except Exception as e:
|
||||
print(f"Avertissement: Impossible de lire ticket_info.json: {e}")
|
||||
|
||||
# Récupérer les informations du sommaire du ticket
|
||||
ticket_summary = {}
|
||||
if "ticket_summary" in data:
|
||||
ticket_summary = data.get("ticket_summary", {})
|
||||
else:
|
||||
summary_path = os.path.join(ticket_dir, "ticket_summary.json")
|
||||
if os.path.exists(summary_path):
|
||||
try:
|
||||
with open(summary_path, 'r', encoding='utf-8') as f:
|
||||
ticket_summary = json.load(f)
|
||||
except Exception as e:
|
||||
print(f"Avertissement: Impossible de lire ticket_summary.json: {e}")
|
||||
|
||||
# Tenter de lire le fichier structure.json
|
||||
structure = {}
|
||||
structure_path = os.path.join(ticket_dir, "structure.json")
|
||||
if os.path.exists(structure_path):
|
||||
try:
|
||||
with open(structure_path, 'r', encoding='utf-8') as f:
|
||||
structure = json.load(f)
|
||||
except Exception as e:
|
||||
print(f"Avertissement: Impossible de lire structure.json: {e}")
|
||||
|
||||
# Commencer à construire le contenu Markdown
|
||||
md_content = []
|
||||
|
||||
# Ajouter l'en-tête du document avec les informations du ticket
|
||||
ticket_code = ticket_summary.get("code", os.path.basename(ticket_dir).split('_')[0])
|
||||
ticket_name = ticket_summary.get("name", "")
|
||||
|
||||
md_content.append(f"# Ticket {ticket_code}: {ticket_name}")
|
||||
md_content.append("")
|
||||
|
||||
# Ajouter des métadonnées du ticket
|
||||
md_content.append("## Informations du ticket")
|
||||
md_content.append("")
|
||||
md_content.append(f"- **Code**: {ticket_code}")
|
||||
md_content.append(f"- **Nom**: {ticket_name}")
|
||||
md_content.append(f"- **Projet**: {ticket_summary.get('project_name', '')}")
|
||||
md_content.append(f"- **État**: {ticket_summary.get('stage_name', '')}")
|
||||
|
||||
# Chercher l'utilisateur assigné dans les métadonnées
|
||||
assigned_to = ""
|
||||
if "user_id" in structure and structure["user_id"]:
|
||||
user_id = structure["user_id"]
|
||||
if isinstance(user_id, list) and len(user_id) > 1:
|
||||
assigned_to = user_id[1]
|
||||
|
||||
md_content.append(f"- **Assigné à**: {assigned_to}")
|
||||
|
||||
# Ajouter le client si disponible
|
||||
partner = ""
|
||||
if "partner_id" in ticket_info:
|
||||
partner_id = ticket_info.get("partner_id", [])
|
||||
if isinstance(partner_id, list) and len(partner_id) > 1:
|
||||
partner = partner_id[1]
|
||||
|
||||
# Ajouter l'email du client si disponible
|
||||
partner_email = ""
|
||||
if "email_from" in ticket_info and ticket_info["email_from"]:
|
||||
partner_email = ticket_info["email_from"]
|
||||
if partner:
|
||||
partner += f", {partner_email}"
|
||||
else:
|
||||
partner = partner_email
|
||||
|
||||
md_content.append(f"- **Client**: {partner}")
|
||||
|
||||
# Ajouter les tags s'ils sont disponibles
|
||||
tags = []
|
||||
if "tag_ids" in ticket_info:
|
||||
tag_ids = ticket_info.get("tag_ids", []) or []
|
||||
for tag in tag_ids:
|
||||
if isinstance(tag, list) and len(tag) > 1:
|
||||
tags.append(tag[1])
|
||||
|
||||
if tags:
|
||||
md_content.append(f"- **Tags**: {', '.join(tags)}")
|
||||
|
||||
# Ajouter les dates
|
||||
md_content.append(f"- **Créé le**: {format_date(ticket_info.get('create_date', ''))}")
|
||||
md_content.append(f"- **Dernière modification**: {format_date(ticket_info.get('write_date', ''))}")
|
||||
if "date_deadline" in ticket_info and ticket_info.get("date_deadline"):
|
||||
md_content.append(f"- **Date limite**: {format_date(ticket_info.get('date_deadline', ''))}")
|
||||
|
||||
md_content.append("")
|
||||
|
||||
# Ajouter la description du ticket
|
||||
description = ticket_info.get("description", "")
|
||||
if description:
|
||||
cleaned_description = clean_html(description)
|
||||
if cleaned_description and cleaned_description != "*Contenu vide*":
|
||||
md_content.append("## Description")
|
||||
md_content.append("")
|
||||
md_content.append(cleaned_description)
|
||||
md_content.append("")
|
||||
|
||||
# Ajouter les messages
|
||||
messages = []
|
||||
if "messages" in data:
|
||||
messages = data.get("messages", [])
|
||||
|
||||
if not messages:
|
||||
md_content.append("## Messages")
|
||||
md_content.append("")
|
||||
md_content.append("*Aucun message disponible*")
|
||||
else:
|
||||
# Filtrer les messages système non pertinents
|
||||
filtered_messages = []
|
||||
for msg in messages:
|
||||
# Ignorer les messages système vides
|
||||
if msg.get("is_system", False) and not msg.get("body", "").strip():
|
||||
continue
|
||||
|
||||
# Ignorer les changements d'état sans contenu
|
||||
if msg.get("is_stage_change", False) and not msg.get("body", "").strip():
|
||||
# Sauf si on veut les garder pour la traçabilité
|
||||
filtered_messages.append(msg)
|
||||
continue
|
||||
|
||||
filtered_messages.append(msg)
|
||||
|
||||
# Si nous avons au moins un message significatif
|
||||
if filtered_messages:
|
||||
md_content.append("## Messages")
|
||||
md_content.append("")
|
||||
|
||||
# Trier les messages par date
|
||||
filtered_messages.sort(key=lambda x: x.get("date", ""))
|
||||
|
||||
for i, message in enumerate(filtered_messages):
|
||||
if not isinstance(message, dict):
|
||||
continue
|
||||
|
||||
# Déterminer l'auteur du message
|
||||
author = "Système"
|
||||
author_details = message.get("author_details", {})
|
||||
if author_details and author_details.get("name"):
|
||||
author = author_details.get("name")
|
||||
else:
|
||||
author_id = message.get("author_id", [])
|
||||
if isinstance(author_id, list) and len(author_id) > 1:
|
||||
author = author_id[1]
|
||||
|
||||
# Formater la date
|
||||
date = format_date(message.get("date", ""))
|
||||
|
||||
# Déterminer le type de message
|
||||
message_type = ""
|
||||
if message.get("is_stage_change", False):
|
||||
message_type = "Changement d'état"
|
||||
elif message.get("is_system", False):
|
||||
message_type = "Système"
|
||||
elif message.get("is_note", False):
|
||||
message_type = "Commentaire"
|
||||
elif message.get("email_from", False):
|
||||
message_type = "E-mail"
|
||||
|
||||
# Récupérer le sujet du message
|
||||
subject = message.get("subject", "")
|
||||
|
||||
# Créer l'en-tête du message
|
||||
md_content.append(f"### Message {i+1}")
|
||||
md_content.append(f"**De**: {author}")
|
||||
md_content.append(f"**Date**: {date}")
|
||||
md_content.append(f"**Type**: {message_type}")
|
||||
if subject:
|
||||
md_content.append(f"**Sujet**: {subject}")
|
||||
|
||||
# Ajouter le corps du message
|
||||
body = message.get("body", "")
|
||||
cleaned_body = clean_html(body)
|
||||
md_content.append("")
|
||||
if not cleaned_body or cleaned_body == "*Contenu vide*":
|
||||
md_content.append("*Contenu vide*")
|
||||
else:
|
||||
md_content.append(cleaned_body)
|
||||
|
||||
# Ajouter les pièces jointes si elles existent
|
||||
attachment_ids = message.get("attachment_ids", [])
|
||||
has_attachments = False
|
||||
|
||||
# Vérifier si les pièces jointes existent et ne sont pas vides
|
||||
if attachment_ids:
|
||||
valid_attachments = []
|
||||
for att in attachment_ids:
|
||||
if isinstance(att, list) and len(att) > 1:
|
||||
valid_attachments.append(att)
|
||||
|
||||
if valid_attachments:
|
||||
has_attachments = True
|
||||
md_content.append("")
|
||||
md_content.append("**Pièces jointes:**")
|
||||
for att in valid_attachments:
|
||||
md_content.append(f"- {att[1]}")
|
||||
|
||||
md_content.append("")
|
||||
md_content.append("---")
|
||||
md_content.append("")
|
||||
|
||||
# Ajouter une section pour les pièces jointes du ticket si elles existent
|
||||
attachment_data = {}
|
||||
attachment_path = os.path.join(ticket_dir, "attachments.json")
|
||||
if os.path.exists(attachment_path):
|
||||
try:
|
||||
with open(attachment_path, 'r', encoding='utf-8') as f:
|
||||
attachment_data = json.load(f)
|
||||
except Exception as e:
|
||||
print(f"Avertissement: Impossible de lire attachments.json: {e}")
|
||||
|
||||
if attachment_data and "attachments" in attachment_data:
|
||||
attachments = attachment_data.get("attachments", [])
|
||||
if attachments:
|
||||
md_content.append("## Pièces jointes")
|
||||
md_content.append("")
|
||||
md_content.append("| Nom | Type | Taille | Date |")
|
||||
md_content.append("|-----|------|--------|------|")
|
||||
|
||||
for att in attachments:
|
||||
name = att.get("name", "")
|
||||
mimetype = att.get("mimetype", "")
|
||||
file_size = att.get("file_size", 0)
|
||||
size_str = f"{file_size / 1024:.1f} KB" if file_size else ""
|
||||
create_date = format_date(att.get("create_date", ""))
|
||||
|
||||
md_content.append(f"| {name} | {mimetype} | {size_str} | {create_date} |")
|
||||
|
||||
md_content.append("")
|
||||
|
||||
# Ajouter des informations sur l'extraction
|
||||
extract_time = datetime.now().strftime("%d/%m/%Y %H:%M:%S")
|
||||
md_content.append("## Informations sur l'extraction")
|
||||
md_content.append("")
|
||||
md_content.append(f"- **Date d'extraction**: {extract_time}")
|
||||
md_content.append(f"- **Répertoire**: {ticket_dir}")
|
||||
|
||||
# Écrire le contenu dans le fichier de sortie
|
||||
try:
|
||||
with open(output_file, 'w', encoding='utf-8') as f:
|
||||
f.write("\n".join(md_content))
|
||||
print(f"Rapport Markdown créé : {output_file}")
|
||||
return True
|
||||
except Exception as e:
|
||||
print(f"Erreur lors de l'écriture du fichier Markdown: {e}")
|
||||
return False
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description="Convertir les fichiers JSON de tickets en Markdown")
|
||||
parser.add_argument("--ticket_code", "-t", help="Code du ticket à convertir (ex: T11067)")
|
||||
parser.add_argument("--date_dir", "-d", help="Dossier spécifique par date, optionnel (ex: 20250403_155134)")
|
||||
parser.add_argument("--input_dir", "-i", default="output", help="Dossier racine contenant les tickets")
|
||||
parser.add_argument("--output_name", "-o", default="rapport.md", help="Nom du fichier Markdown à générer")
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
if not args.ticket_code:
|
||||
print("Erreur : Vous devez spécifier un code de ticket. Exemple : -t T11067")
|
||||
sys.exit(1)
|
||||
|
||||
# Construire le chemin d'entrée
|
||||
ticket_dir = f"{args.input_dir}/ticket_{args.ticket_code}"
|
||||
|
||||
if args.date_dir:
|
||||
ticket_dir = f"{ticket_dir}/{args.ticket_code}_{args.date_dir}"
|
||||
else:
|
||||
# Trouver le dossier le plus récent
|
||||
import glob
|
||||
date_dirs = glob.glob(f"{ticket_dir}/{args.ticket_code}_*")
|
||||
if date_dirs:
|
||||
ticket_dir = max(date_dirs) # Prend le plus récent par ordre alphabétique
|
||||
|
||||
json_file = f"{ticket_dir}/all_messages.json"
|
||||
output_file = f"{ticket_dir}/{args.output_name}"
|
||||
|
||||
if not os.path.exists(json_file):
|
||||
print(f"Erreur : Le fichier {json_file} n'existe pas.")
|
||||
sys.exit(1)
|
||||
|
||||
if create_markdown_from_json(json_file, output_file):
|
||||
print(f"Rapport Markdown créé : {output_file}")
|
||||
else:
|
||||
print("Échec de la création du rapport Markdown")
|
||||
sys.exit(1)
|
||||
@ -275,13 +275,23 @@ class MessageManager:
|
||||
|
||||
# Appliquer la stratégie de nettoyage, sauf si raw
|
||||
if strategy != "raw":
|
||||
message_copy['body'] = clean_html(
|
||||
cleaned_body = clean_html(
|
||||
message_copy.get('body', ''),
|
||||
strategy=cleaning_config['strategy'],
|
||||
preserve_links=cleaning_config['preserve_links'],
|
||||
preserve_images=cleaning_config['preserve_images']
|
||||
)
|
||||
|
||||
|
||||
# Nettoyer davantage le code HTML qui pourrait rester
|
||||
if cleaned_body:
|
||||
# Supprimer les balises style et script avec leur contenu
|
||||
cleaned_body = re.sub(r'<style[^>]*>.*?</style>', '', cleaned_body, flags=re.DOTALL)
|
||||
cleaned_body = re.sub(r'<script[^>]*>.*?</script>', '', cleaned_body, flags=re.DOTALL)
|
||||
# Supprimer les balises HTML restantes
|
||||
cleaned_body = re.sub(r'<[^>]+>', '', cleaned_body)
|
||||
|
||||
message_copy['body'] = cleaned_body
|
||||
|
||||
# Récupérer les détails de l'auteur
|
||||
message_copy['author_details'] = self.get_message_author_details(message_copy)
|
||||
|
||||
@ -302,12 +312,45 @@ class MessageManager:
|
||||
# Trier les messages par date
|
||||
processed_messages.sort(key=lambda x: x.get('date', ''))
|
||||
|
||||
# Récupérer les informations supplémentaires du ticket
|
||||
try:
|
||||
ticket_data = self.auth._rpc_call("/web/dataset/call_kw", {
|
||||
"model": "project.task",
|
||||
"method": "read",
|
||||
"args": [[ticket_id]],
|
||||
"kwargs": {"fields": ["project_id", "stage_id"]}
|
||||
})
|
||||
|
||||
project_id = None
|
||||
stage_id = None
|
||||
project_name = None
|
||||
stage_name = None
|
||||
|
||||
if ticket_data and isinstance(ticket_data, list) and len(ticket_data) > 0:
|
||||
if "project_id" in ticket_data[0] and ticket_data[0]["project_id"]:
|
||||
project_id = ticket_data[0]["project_id"][0] if isinstance(ticket_data[0]["project_id"], list) else ticket_data[0]["project_id"]
|
||||
project_name = ticket_data[0]["project_id"][1] if isinstance(ticket_data[0]["project_id"], list) else None
|
||||
|
||||
if "stage_id" in ticket_data[0] and ticket_data[0]["stage_id"]:
|
||||
stage_id = ticket_data[0]["stage_id"][0] if isinstance(ticket_data[0]["stage_id"], list) else ticket_data[0]["stage_id"]
|
||||
stage_name = ticket_data[0]["stage_id"][1] if isinstance(ticket_data[0]["stage_id"], list) else None
|
||||
except Exception as e:
|
||||
logging.error(f"Erreur lors de la récupération des informations du ticket: {e}")
|
||||
project_id = None
|
||||
stage_id = None
|
||||
project_name = None
|
||||
stage_name = None
|
||||
|
||||
# Créer la structure pour le JSON
|
||||
messages_with_summary = {
|
||||
"ticket_summary": {
|
||||
"id": ticket_id,
|
||||
"code": ticket_code,
|
||||
"name": ticket_name,
|
||||
"project_id": project_id,
|
||||
"project_name": project_name,
|
||||
"stage_id": stage_id,
|
||||
"stage_name": stage_name,
|
||||
"date_extraction": datetime.now().isoformat()
|
||||
},
|
||||
"metadata": {
|
||||
|
||||