Skip to content

Comments

Fix(converter): Ne pas créer de note lorsque le champ langue est absent#360

Merged
issam71100 merged 5 commits intomainfrom
fix/converter/skip-empty-language-note
Feb 3, 2026
Merged

Fix(converter): Ne pas créer de note lorsque le champ langue est absent#360
issam71100 merged 5 commits intomainfrom
fix/converter/skip-empty-language-note

Conversation

@issam71100
Copy link
Contributor

@issam71100 issam71100 commented Jan 29, 2026

🔎 Détails

Problème

Lors de la conversion V1→V2/V3 des messages createCaseHealth, une note "Langue du requérant: ..." était incorrectement ajoutée même lorsque le champ language n'existait pas dans le message source.

Solution

Modifié la fonction update_language() pour distinguer trois cas :

  • Langue valide en V2 → mapping vers le nouveau code
  • Langue invalide en V2 → ajout d'une note + suppression du champ
  • Langue absente → suppression du champ sans ajout de note ✅

Ajouts de tests

  • Nouveau fixture RS-EDA_V1.0_no_language.json (message V1 sans champ langue)
  • Test vérification V1→V2 puis V1→V3

📄 Documentation

Ajoutez un (des) lien(s) vers la documentation si nécessaire

📸 Captures d'écran

Avant Après

🔗 Ticket associé

[BUG] : Création d'une note inutile sur la langue du requérant lors d'une conversion v1<->v3 du RS-EDA

@issam71100 issam71100 marked this pull request as ready for review January 29, 2026 10:59
@github-actions
Copy link

There is no coverage information present for the Files changed

Total Project Coverage 52.57% 🍏

@github-actions
Copy link

github-actions bot commented Feb 2, 2026

There is no coverage information present for the Files changed

Total Project Coverage 52.57% 🍏

@github-actions
Copy link

github-actions bot commented Feb 2, 2026

Coverage

Converter - python code coverage
FileStmtsMissCoverMissing
constants.py40100% 
conversion_mixin.py23195%24
converter.py57394%23, 91–92
logging_config.py35197%29
utils.py164398%57, 108, 120
cisu
   base_cisu_converter.py33390%7, 25, 31
   constants.py40100% 
   identical_cisu_converter.py90100% 
   utils.py150100% 
cisu/create_case
   create_case_cisu_constants.py310100% 
   create_case_cisu_converter.py145199%112
cisu/reference
   reference_converter.py9277%9, 13
cisu/resources_info
   resources_info_cisu_constants.py90100% 
   resources_info_cisu_converter.py680100% 
cisu/resources_status
   resources_status_converter.py190100% 
conversion_strategy
   cisu_conversion_strategy.py47295%63, 90
   conversion_strategy.py60100% 
   health_conversion_strategy.py520100% 
versions
   base_message_converter.py831285%13, 72–74, 86, 98, 102, 106, 110, 114, 118, 124
   error_converter.py5180%7
   identical_message_converter.py150100% 
   utils.py26580%34–37, 43
versions/create_case_health
   constants.py40100% 
   create_case_health_converter.py1780100% 
   create_case_health_update_converter.py50100% 
versions/create_case_health/v1_v2
   constants.py170100% 
   utils.py460100% 
versions/create_case_health/v2_v3
   constants.py290100% 
versions/document_link
   document_link_constants.py20100% 
   document_link_converter.py190100% 
versions/geo_positions_update
   geo_positions_update_constants.py40100% 
   geo_positions_update_converter.py49393%31, 42, 79
versions/geo_resources_details
   geo_resources_details_constants.py40100% 
   geo_resources_details_converter.py270100% 
versions/intervention_report
   intervention_report_constants.py130100% 
   intervention_report_converter.py810100% 
versions/reference
   reference_constants.py20100% 
   reference_converter.py130100% 
versions/resources_engagement
   resources_engagement_constants.py30100% 
   resources_engagement_converter.py220100% 
versions/resources_info
   resources_info_constants.py190100% 
   resources_info_converter.py840100% 
versions/resources_request
   resources_request_constants.py20100% 
   resources_request_converter.py210100% 
versions/resources_response
   resources_response_constants.py40100% 
   resources_response_converter.py160100% 
versions/resources_status
   resources_status_constants.py100100% 
   resources_status_converter.py390100% 
versions/rpis
   rpis_constants.py120100% 
   rpis_converter.py260100% 
TOTAL16103797% 

@github-actions
Copy link

github-actions bot commented Feb 2, 2026

There is no coverage information present for the Files changed

Total Project Coverage 52.57% 🍏

@github-actions
Copy link

github-actions bot commented Feb 3, 2026

There is no coverage information present for the Files changed

Total Project Coverage 52.57% 🍏

@issam71100 issam71100 requested a review from Clemsazert February 3, 2026 08:31
@issam71100 issam71100 merged commit 50cf474 into main Feb 3, 2026
2 checks passed
@issam71100 issam71100 deleted the fix/converter/skip-empty-language-note branch February 3, 2026 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants