Skip to content

fix(core): DuplicateDMLOperation handles JSON-sourced boolean flow metadata - #309

Merged
RubenHalman merged 1 commit into
mainfrom
fix/duplicate-dml-json-boolean
Oct 5, 2026
Merged

RubenHalman merged 1 commit into
mainfrom
fix/duplicate-dml-json-boolean

Conversation

@RubenHalman

@RubenHalman RubenHalman commented Aug 25, 2026 •

Copy link
Copy Markdown
Member

Summary

  • DuplicateDMLOperation compared allowBack/showFooter strictly against the string "true", so flows built from Tooling API JSON (real booleans, e.g. the Salesforce app fetching Flow.Metadata) never matched: violations went unreported and the back-disabled reset never fired.
  • Added a small isTrue helper (matches the coercion pattern already used in MissingNullHandler.ts and RecordIdAsString.ts) and used it in all three comparisons.

Impact

Any consumer that hands core Tooling API JSON instead of parsed XML is affected, including Salesforce Inspector Reloaded and Org Check, as well as the LFS Salesforce app. On those, this rule silently reports nothing on screens with back navigation, and the reset fires on every screen.

Scope note

Evaluated the "coerce booleans once at Flow construction" structural alternative suggested on the ticket. Decided against it for this fix: it would touch shared Flow/FlowNode parsing broadly for every rule, which is a bigger blast radius than this scoped bug warrants. The local isTrue helper matches the existing per-rule pattern and is the minimal correct fix.

Rollout to force-app/main/default/staticresources/LFS_Core.js in the LFS Salesforce app repo is a separate follow-up once this lands in a core release — not bundled into an unreleased build here.

Test plan

  • New regression test: JSON-shaped flow (real booleans) reports the violation
  • New regression test: JSON-shaped flow verifies the back-disabled reset clears the seen-DML flag
  • Existing XML-based tests still pass
  • npx jest — full core suite green except pre-existing, unrelated SanityTest.test.ts UMD-global failure (confirmed present on main before this change, needs a UMD build artifact)
  • tsc --noEmit clean

Plane: LFS-15

…w metadata

allowBack/showFooter compared strictly against the string "true", so flows
parsed from Tooling API JSON (real booleans) never matched: violations were
silently missed and the back-disabled reset never fired.
@RubenHalman
RubenHalman force-pushed the fix/duplicate-dml-json-boolean branch from b673f6b to a7c44e9 Compare October 5, 2026 18:37
@RubenHalman
RubenHalman merged commit 2f58971 into main Oct 5, 2026
1 check passed
@RubenHalman
RubenHalman deleted the fix/duplicate-dml-json-boolean branch October 5, 2026 18:39
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.

1 participant