diff --git a/__pycache__/ticket_manager.cpython-312.pyc b/__pycache__/ticket_manager.cpython-312.pyc index 3001814..1680351 100644 Binary files a/__pycache__/ticket_manager.cpython-312.pyc and b/__pycache__/ticket_manager.cpython-312.pyc differ diff --git a/exported_tickets/ticket_10157_raw.json b/exported_tickets/ticket_10157_raw.json new file mode 100644 index 0000000..3ac2224 --- /dev/null +++ b/exported_tickets/ticket_10157_raw.json @@ -0,0 +1,141 @@ +{ + "id": 10157, + "active": true, + "name": "L'arrondi au 1/10 ne se fait pas sur la granulométrie du contrôle de conformité", + "description": "

L'arrondi au 1/10 ne se fait pas sur la granulométrie du contrôle de conformité sur le granulat 0.5




", + "sequence": 3, + "stage_id": [ + 46, + "Tickets existants" + ], + "kanban_state": "normal", + "create_date": "2024-10-14 14:46:55", + "write_date": "2025-03-18 15:49:16", + "date_start": "2024-10-14 14:46:55", + "date_end": false, + "date_assign": false, + "date_deadline": false, + "date_last_stage_update": "2024-10-15 08:40:18", + "project_id": [ + 4, + "Tickets" + ], + "notes": false, + "planned_hours": 0.0, + "user_id": false, + "partner_id": [ + 28644, + "GROLLEMUND LABOROUTES GRAND EST, Marion NICOD" + ], + "company_id": [ + 1, + "CBAO S.A.R.L." + ], + "color": 0, + "displayed_image_id": false, + "parent_id": false, + "child_ids": [], + "email_from": "m.nicod@laboroutes.com", + "email_cc": false, + "working_hours_open": 0.0, + "working_hours_close": 0.0, + "working_days_open": 0.0, + "working_days_close": 0.0, + "website_message_ids": [ + 205371 + ], + "remaining_hours": 0.0, + "effective_hours": 0.0, + "total_hours_spent": 0.0, + "progress": 0.0, + "subtask_effective_hours": 0.0, + "timesheet_ids": [], + "priority": "0", + "code": "T10178", + "milestone_id": false, + "sale_line_id": false, + "sale_order_id": false, + "billable_type": "no", + "activity_ids": [], + "message_follower_ids": [ + 81962, + 81963 + ], + "message_ids": [ + 205371, + 205370, + 205302 + ], + "message_main_attachment_id": false, + "failed_message_ids": [], + "rating_ids": [], + "rating_last_value": 0.0, + "access_token": false, + "create_uid": [ + 32, + "Romuald GRUSON" + ], + "write_uid": [ + 22, + "Fabien LAFAY" + ], + "x_CBAO_windows_maj_ID": false, + "x_CBAO_version_signalement": false, + "x_CBAO_version_correction": false, + "x_CBAO_DateCorrection": false, + "x_CBAO_Scoring_Facilite": 0, + "x_CBAO_Scoring_Importance": 2, + "x_CBAO_Scoring_Urgence": 2, + "x_CBAO_Scoring_Incidence": 2, + "x_CBAO_Scoring_Resultat": 6, + "x_CBAO_InformationsSup": false, + "kanban_state_label": "En cours", + "subtask_planned_hours": 0.0, + "manager_id": [ + 8, + "Quentin FAIVRE" + ], + "user_email": false, + "attachment_ids": [], + "legend_blocked": "Bloqué", + "legend_done": "Prêt pour la prochaine étape", + "legend_normal": "En cours", + "subtask_project_id": [ + 4, + "Tickets" + ], + "subtask_count": 0, + "analytic_account_active": true, + "allow_timesheets": true, + "use_milestones": false, + "show_time_control": "start", + "is_project_map_empty": true, + "activity_state": false, + "activity_user_id": false, + "activity_type_id": false, + "activity_date_deadline": false, + "activity_summary": false, + "message_is_follower": false, + "message_unread": false, + "message_unread_counter": 0, + "message_needaction": false, + "message_needaction_counter": 0, + "message_has_error": false, + "message_has_error_counter": 0, + "message_attachment_count": 0, + "rating_last_feedback": false, + "rating_last_image": false, + "rating_count": 0, + "access_url": "/my/task/10157", + "access_warning": "", + "display_name": "[T10178] L'arrondi au 1/10 ne se fait pas sur la granulométrie du contrôle de conformité", + "__last_update": "2025-03-18 15:49:16", + "stage_id_value": "Tickets existants", + "project_id_value": "Tickets", + "partner_id_value": "GROLLEMUND LABOROUTES GRAND EST, Marion NICOD", + "manager_id_value": "Quentin FAIVRE", + "company_id_value": "CBAO S.A.R.L.", + "subtask_project_id_value": "Tickets", + "create_uid_value": "Romuald GRUSON", + "write_uid_value": "Fabien LAFAY" +} \ No newline at end of file diff --git a/exported_tickets/ticket_10908_raw.json b/exported_tickets/ticket_10908_raw.json deleted file mode 100644 index 136f654..0000000 --- a/exported_tickets/ticket_10908_raw.json +++ /dev/null @@ -1,155 +0,0 @@ -[ - { - "id": 10908, - "active": true, - "name": "TR: MAJ BRGlab", - "description": "


", - "sequence": 0, - "stage_id": [ - 5, - "En attente de résolution" - ], - "kanban_state": "normal", - "create_date": "2025-02-20 09:37:13", - "write_date": "2025-03-18 08:03:21", - "date_start": "2025-02-20 09:37:16", - "date_end": false, - "date_assign": "2025-02-20 13:13:32", - "date_deadline": false, - "date_last_stage_update": "2025-02-21 15:17:55", - "project_id": [ - 3, - "Demandes" - ], - "notes": false, - "planned_hours": 0.0, - "user_id": [ - 32, - "Romuald GRUSON" - ], - "partner_id": [ - 5654, - "EGIS SA, Olivier ANTONI" - ], - "company_id": [ - 1, - "CBAO S.A.R.L." - ], - "color": 0, - "displayed_image_id": false, - "parent_id": false, - "child_ids": [], - "email_from": "ANTONI Olivier ", - "email_cc": "", - "working_hours_open": 2.379627116111111, - "working_hours_close": 0.0, - "working_days_open": 0.09915112983796297, - "working_days_close": 0.0, - "website_message_ids": [ - 225765, - 225755, - 225633, - 225612 - ], - "remaining_hours": 0.0, - "effective_hours": 0.0, - "total_hours_spent": 0.0, - "progress": 0.0, - "subtask_effective_hours": 0.0, - "timesheet_ids": [], - "priority": "0", - "code": "T10929", - "milestone_id": false, - "sale_line_id": false, - "sale_order_id": false, - "billable_type": "no", - "activity_ids": [], - "message_follower_ids": [ - 88384, - 88385, - 88404, - 88405 - ], - "message_ids": [ - 227288, - 225765, - 225756, - 225755, - 225636, - 225635, - 225634, - 225633, - 225614, - 225613, - 225612, - 225611 - ], - "message_main_attachment_id": [ - 143360, - "Outlook-nppfhufh" - ], - "failed_message_ids": [], - "rating_ids": [], - "rating_last_value": 0.0, - "access_token": "3307e367-64be-4943-9682-db68a0a1efbd", - "create_uid": [ - 1, - "OdooBot" - ], - "write_uid": [ - 32, - "Romuald GRUSON" - ], - "x_CBAO_windows_maj_ID": false, - "x_CBAO_version_signalement": false, - "x_CBAO_version_correction": false, - "x_CBAO_DateCorrection": false, - "x_CBAO_Scoring_Facilite": 0, - "x_CBAO_Scoring_Importance": 0, - "x_CBAO_Scoring_Urgence": 0, - "x_CBAO_Scoring_Incidence": 0, - "x_CBAO_Scoring_Resultat": 0, - "x_CBAO_InformationsSup": false, - "kanban_state_label": "En cours", - "subtask_planned_hours": 0.0, - "manager_id": [ - 22, - "Fabien LAFAY" - ], - "user_email": "romuald@mail.cbao.fr", - "attachment_ids": [], - "legend_blocked": "Bloquéé", - "legend_done": "Planifiée", - "legend_normal": "En cours", - "subtask_project_id": [ - 3, - "Demandes" - ], - "subtask_count": 0, - "analytic_account_active": true, - "allow_timesheets": true, - "use_milestones": false, - "show_time_control": "start", - "is_project_map_empty": true, - "activity_state": false, - "activity_user_id": false, - "activity_type_id": false, - "activity_date_deadline": false, - "activity_summary": false, - "message_is_follower": false, - "message_unread": false, - "message_unread_counter": 0, - "message_needaction": false, - "message_needaction_counter": 0, - "message_has_error": false, - "message_has_error_counter": 0, - "message_attachment_count": 17, - "rating_last_feedback": false, - "rating_last_image": false, - "rating_count": 0, - "access_url": "/my/task/10908", - "access_warning": "", - "display_name": "[T10929] TR: MAJ BRGlab", - "__last_update": "2025-03-18 08:03:21" - } -] \ No newline at end of file diff --git a/exported_tickets/ticket_10972_raw.json b/exported_tickets/ticket_10972_raw.json deleted file mode 100644 index 7ad0852..0000000 --- a/exported_tickets/ticket_10972_raw.json +++ /dev/null @@ -1,154 +0,0 @@ -[ - { - "id": 10972, - "active": true, - "name": "problème FTP ajout de norme", - "description": "


", - "sequence": 4, - "stage_id": [ - 32, - "En attente d'infos / retours" - ], - "kanban_state": "normal", - "create_date": "2025-03-03 10:37:10", - "write_date": "2025-03-04 13:59:33", - "date_start": "2025-03-03 10:37:11", - "date_end": false, - "date_assign": "2025-03-03 10:43:30", - "date_deadline": "2025-03-19", - "date_last_stage_update": "2025-03-04 13:59:33", - "project_id": [ - 3, - "Demandes" - ], - "notes": false, - "planned_hours": 0.0, - "user_id": [ - 32, - "Romuald GRUSON" - ], - "partner_id": [ - 29845, - "COPAT SAS, LABO" - ], - "company_id": [ - 1, - "CBAO S.A.R.L." - ], - "color": 0, - "displayed_image_id": false, - "parent_id": false, - "child_ids": [], - "email_from": "LABO ", - "email_cc": "", - "working_hours_open": 0.1055228725, - "working_hours_close": 0.0, - "working_days_open": 0.004396786354166667, - "working_days_close": 0.0, - "website_message_ids": [ - 226706, - 226523, - 226494, - 226481 - ], - "remaining_hours": 0.0, - "effective_hours": 0.0, - "total_hours_spent": 0.0, - "progress": 0.0, - "subtask_effective_hours": 0.0, - "timesheet_ids": [], - "priority": "0", - "code": "T10993", - "milestone_id": false, - "sale_line_id": false, - "sale_order_id": false, - "billable_type": "no", - "activity_ids": [], - "message_follower_ids": [ - 88919, - 88927, - 88928 - ], - "message_ids": [ - 226708, - 226707, - 226706, - 226527, - 226523, - 226497, - 226496, - 226495, - 226494, - 226482, - 226481, - 226480 - ], - "message_main_attachment_id": [ - 143929, - "image001.jpg" - ], - "failed_message_ids": [], - "rating_ids": [], - "rating_last_value": 0.0, - "access_token": "c60bd01e-847d-49be-820e-8a4f3898698e", - "create_uid": [ - 1, - "OdooBot" - ], - "write_uid": [ - 32, - "Romuald GRUSON" - ], - "x_CBAO_windows_maj_ID": false, - "x_CBAO_version_signalement": false, - "x_CBAO_version_correction": false, - "x_CBAO_DateCorrection": false, - "x_CBAO_Scoring_Facilite": 0, - "x_CBAO_Scoring_Importance": 0, - "x_CBAO_Scoring_Urgence": 0, - "x_CBAO_Scoring_Incidence": 0, - "x_CBAO_Scoring_Resultat": 0, - "x_CBAO_InformationsSup": false, - "kanban_state_label": "En cours", - "subtask_planned_hours": 0.0, - "manager_id": [ - 22, - "Fabien LAFAY" - ], - "user_email": "romuald@mail.cbao.fr", - "attachment_ids": [], - "legend_blocked": "Bloqué", - "legend_done": "Prêt pour la prochaine étape", - "legend_normal": "En cours", - "subtask_project_id": [ - 3, - "Demandes" - ], - "subtask_count": 0, - "analytic_account_active": true, - "allow_timesheets": true, - "use_milestones": false, - "show_time_control": "start", - "is_project_map_empty": true, - "activity_state": false, - "activity_user_id": false, - "activity_type_id": false, - "activity_date_deadline": false, - "activity_summary": false, - "message_is_follower": false, - "message_unread": false, - "message_unread_counter": 0, - "message_needaction": false, - "message_needaction_counter": 0, - "message_has_error": false, - "message_has_error_counter": 0, - "message_attachment_count": 3, - "rating_last_feedback": false, - "rating_last_image": false, - "rating_count": 0, - "access_url": "/my/task/10972", - "access_warning": "", - "display_name": "[T10993] problème FTP ajout de norme", - "__last_update": "2025-03-04 13:59:33" - } -] \ No newline at end of file diff --git a/exported_tickets/ticket_T10929_raw.json b/exported_tickets/ticket_T10929_raw.json deleted file mode 100644 index 1ba3ba8..0000000 --- a/exported_tickets/ticket_T10929_raw.json +++ /dev/null @@ -1,3 +0,0 @@ -[ - 10908 -] \ No newline at end of file diff --git a/exported_tickets/ticket_T10993_raw.json b/exported_tickets/ticket_T10993_raw.json deleted file mode 100644 index 5b7d8e1..0000000 --- a/exported_tickets/ticket_T10993_raw.json +++ /dev/null @@ -1,3 +0,0 @@ -[ - 10972 -] \ No newline at end of file diff --git a/ticket_manager.py b/ticket_manager.py index 539fd60..464200a 100644 --- a/ticket_manager.py +++ b/ticket_manager.py @@ -81,7 +81,7 @@ class TicketManager: for field, info in fields_info.items(): if info.get("type") == "many2one" and isinstance(ticket.get(field), list): - ticket[f"{field}_value"] = ticket[field[1]] if len(ticket[field]) > 1 else None #Ajoute la valeur lisible en plus du ID + ticket[f"{field}_value"] = ticket[field][1] if len(ticket[field]) > 1 else None #Ajoute la valeur lisible en plus du ID return ticket