[28.0] [Quality Mgmt.] Bug 624560: Fixing Translated Label Inconsistencies (…#7081
Merged
attilatoury merged 2 commits intoreleases/28.0from Mar 12, 2026
Merged
Conversation
…7036) Fixes [AB#624560](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/624560) Fix translation inconsistency for inspection result codes (FAIL, INPROGRESS, PASS) The demo data app redefined the FAIL, INPROGRESS, and PASS code labels without Locked = true, while the main app's QltyAutoConfigure had them locked. In translated environments, the demo data inserted records with translated codes (e.g., IN BEARBEITUNG) that failed validation against the main app's locked values. Fix: Removed the duplicated labels from CreateQualityInspResult and replaced them with calls to new public getter procedures on QltyAutoConfigure (GetDefaultFailResult, GetDefaultInProgressResult, and corresponding description getters), ensuring the demo data always uses the exact same locked values as the main app. Also fixed EcoliPresentDescLbl which incorrectly used the raw code token 'ECOLIPRESENT' instead of a human-readable description. ADDITIONALLY: Locking all the labels used as primary key as the easiest acceptable fix for the following issue: Root cause: The Qlty. Test table's Code field has an OnValidate trigger that strips special characters (e.g. spaces). When a Tok label like 'ECOLIPRESENT' gets translated to 'ECOLI PRESENT', two things happen: InsertQualityTest validates the Code → OnValidate strips the space → record is stored as 'ECOLIPRESENT' InsertQualityInspectionTemplateLine validates "Test Code" with the raw translated value 'ECOLI PRESENT' → tries QltyTest.Get('ECOLI PRESENT') → record not found Fix: Add Locked = true to all Tok labels used as Code/identifier values in CreateQualityTest, CreateQualityLookupValue, and CreateQMInspTemplateHdr, preventing translation of these primary key values.
PredragMaricic
approved these changes
Mar 11, 2026
BardurKnudsen
approved these changes
Mar 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes AB#624560
Fixes AB#624795
Fix translation inconsistency for inspection result codes (FAIL, INPROGRESS, PASS)
The demo data app redefined the FAIL, INPROGRESS, and PASS code labels without Locked = true, while the main app's QltyAutoConfigure had them locked. In translated environments, the demo data inserted records with translated codes (e.g., IN BEARBEITUNG) that failed validation against the main app's locked values.
Fix: Removed the duplicated labels from CreateQualityInspResult and replaced them with calls to new public getter procedures on QltyAutoConfigure (GetDefaultFailResult, GetDefaultInProgressResult, and corresponding description getters), ensuring the demo data always uses the exact same locked values as the main app.
Also fixed EcoliPresentDescLbl which incorrectly used the raw code token 'ECOLIPRESENT' instead of a human-readable description.
ADDITIONALLY:
Locking all the labels used as primary key as the easiest acceptable fix for the following issue:
Root cause: The Qlty. Test table's Code field has an OnValidate trigger that strips special characters (e.g. spaces). When a Tok label like 'ECOLIPRESENT' gets translated to 'ECOLI PRESENT', two things happen: InsertQualityTest validates the Code → OnValidate strips the space → record is stored as 'ECOLIPRESENT'
InsertQualityInspectionTemplateLine validates "Test Code" with the raw translated value 'ECOLI PRESENT' → tries QltyTest.Get('ECOLI PRESENT') → record not found
Fix: Add Locked = true to all Tok labels used as Code/identifier values in CreateQualityTest, CreateQualityLookupValue, and CreateQMInspTemplateHdr, preventing translation of these primary key values.