[Quality Management] Fix promoted-result matrix column visibility in pages#8252
[Quality Management] Fix promoted-result matrix column visibility in pages#8252JakovljevicDusan wants to merge 5 commits into
Conversation
UpdateRowData Not Called for Each RowThe call to Recommendation:
Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why JakovljevicDusan: Move to OnOpenPage, since it is setting visibility. |
EnsureResultsExist Removed from OnInsertRemoving the Recommendation:
Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with whyJakovljevicDusan: A bit specific, since in the callstack this execution was skipped as the line is not yet in the database. So, it is removed since it is redundant. |
State Variables Not Refreshed After Field ValidationRemoving Recommendation:
Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why |
Fallback to Default Promoted Results RemovedThe old Recommendation:
Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why |
EnsureResultsExist dropped from OnInsertRemoving Recommendation:
Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why |
OnAfterGetCurrRecord removed from card pageThe removed Recommendation:
Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why |
EnsureResultsExist removed from OnInsertThe call to Recommendation:
Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why |
EnsureResultsExist removed from OnNewRecordThe Recommendation:
Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why |
OnAfterGetCurrRecord removed; navigation skips row-data refresh
Recommendation:
Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why |
OnInsertRecord removed; UI state stale on new record
Recommendation:
Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why |
Local MatrixVisibleState in UpdateRowData is unused
Recommendation:
Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why |
EnsureResultsExist removed from OnInsertThe Recommendation:
Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why |
UpdateRowData removed from OnAfterGetCurrRecord
Recommendation:
Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why |
Redundant CalcFields call per subform row
Recommendation:
Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why |
Iterator increments for results without conditionsIterator is unconditionally incremented for every promoted QltyInspectionResult, even when no matching QltyIResultConditConf exists. This wastes matrix slots, so if several results lack configs the useful conditions may be pushed past MaxResultConditions and silently dropped from the matrix. Recommendation:
Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why |
EnsureResultsExist removed from OnInsertThe call to EnsureResultsExist(true) was removed from the OnInsert trigger. Any code that inserts a new Qlty. Inspection Template Line and then immediately reads or processes its result records will now find no results exist, potentially causing downstream errors or silent data-integrity gaps. Recommendation:
Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why |
UpdateRowData removed from OnAfterGetCurrRecordUpdateRowData() was removed from the OnAfterGetCurrRecord trigger body in QltyInspectionSubform. This means CanEditTestValue, MeasurementNote, and matrix condition cell data will not refresh when the user navigates between subform rows by clicking, causing stale data to remain displayed for the newly selected row. Recommendation:
Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why |
FindFirst silently drops multi-condition configsThe old code iterated QltyIResultConditConf and could expose multiple condition configurations per result code as separate matrix columns. The new code calls FindFirst() and only surfaces the single highest-priority config, silently discarding any others that previously appeared in separate slots. Recommendation:
Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why |
Column visibility set once; never refreshedVisible1-10 are populated once in OnOpenPage from GetDefaultPromotedResults. If the set of promoted inspection results changes while the page is open (e.g., another user edits the result configuration), the column visibility will be stale until the page is reopened. Recommendation:
Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why |
Default promoted-result fallback removedThe old UpdateRowData fell back to GetDefaultPromotedResults when GetPromotedResultsForTest returned no visible state (MatrixVisibleState[1] was false). The new code calls GetPromotedResultsForTest unconditionally and discards its visible-state output. Tests that previously relied on the fallback to display the default matrix columns will now show empty columns. Recommendation:
Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why |
EditableResult depends on stale Visible1EditableResult is computed as (Rec.Code <> '') and (CurrPage.Editable) and (Visible1) and (MatrixArrayCaptionSet[1] <> ''). Visible1 is now fixed at page-open time. If the promoted-results configuration changes, Visible1 will be stale, potentially keeping EditableResult false even when editing should be allowed. Recommendation:
Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why |
OnAfterGetCurrRecord removed from lookup pageBoth OnAfterGetRecord and OnAfterGetCurrRecord previously called UpdateRowData() in QltyTestLookup. OnAfterGetCurrRecord is removed, so IsAllowableValuesEditable and the matrix condition data will not refresh when a user navigates between rows in the lookup without triggering a full record re-read. Recommendation:
Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why |
OnAfterGetCurrRecord removed from list pageOnAfterGetCurrRecord was removed from QltyTests (a list page). In list pages, OnAfterGetCurrRecord fires when the user navigates between rows without re-reading from the database. Relying solely on OnAfterGetRecord means condition cell data will not refresh on navigation, leaving stale values visible. Recommendation:
Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why |
What & why
Fixes issue "Conditions disappears from the template once user selected new test of type Label" and related issues.
Fixes:
Linked work
Fixes AB#622771
Fixes AB#622770