[AI Test Toolkit] Refresh Run History when changing View By#8440
Draft
onbuyuka wants to merge 1 commit into
Draft
[AI Test Toolkit] Refresh Run History when changing View By#8440onbuyuka wants to merge 1 commit into
onbuyuka wants to merge 1 commit into
Conversation
…w By On page 149032 "AIT Run History" (AI Eval Suite Run History), changing the "View By" control (or toggling "Apply Filter") did not update the displayed data. Two causes: 1. UpdateRunHistory() rebuilt the temporary source table (DeleteAll + re-Insert in codeunit 149036 "AIT Run History".GetHistory) but then called the parameterless CurrPage.Update(), which defaults to Update(true) and attempts to save the (now-deleted) current record instead of redrawing. After repopulating a temporary page source the correct call is CurrPage.Update(false). 2. GetHistory only set the "Line No. Filter" FlowFilter when LineNo <> 0 and never cleared it, so unchecking "Apply Filter" (LineNo -> 0) left the stale line filter on the FlowFields, showing zeros/old data. Fix: call CurrPage.Update(false) after rebuilding the temp records, and clear the "Line No. Filter" FlowFilter when LineNo = 0. Fixes AB#622420 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2ab4796 to
e058a94
Compare
Contributor
Author
CI note: the Clean build failure is a known BCApps incremental-build infra issue — not this changeThe Evidence it is infrastructure, not this change:
No code change is appropriate (a |
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.
Summary
On the AI Eval Suite Run History page (
page 149032 "AIT Run History"), changing the View By control (Version/Tag) — or toggling Apply Filter — did not update the displayed data.Root cause
Two compounding defects in the refresh path:
Repaint.
UpdateRunHistory()rebuilds the temporary source table (DeleteAll+ re-Insertinsidecodeunit 149036 "AIT Run History".GetHistory) and then calls the parameterlessCurrPage.Update(), which defaults toUpdate(true). That tries to save the (just-deleted) current record rather than redraw. The canonical pattern after repopulating a temporary page source isCurrPage.Update(false).Stale FlowFilter.
GetHistoryset the"Line No. Filter"FlowFilter only whenLineNo <> 0and never cleared it. SinceDeleteAlldoes not clear filters, unchecking Apply Filter (LineNo -> 0) left the previous line filter on the FlowFields, so the columns recomputed against the wrong line and showed zeros/old data.Fix
AITRunHistory.Page.al—CurrPage.Update(false)after rebuilding the temp records.AITRunHistory.Codeunit.al— clear the"Line No. Filter"FlowFilter whenLineNo = 0(add anelse SetRange("Line No. Filter")).Impact / risk
Low — internal AI Test Toolkit tooling page, read-only temporary source. Both changes are the standard idioms for this scenario.
Verification
View ByOnValidate →UpdateRunHistory→GetHistory(sole data builder) →CurrPage.Update. FlowField columns key on"Line No. Filter".Linked work item: AB#622420
🤖 Generated with Claude Code