Skip to content

FOUR-32834: Preserve Collection Record Control mode - #1930

Open
eiresendez wants to merge 1 commit into
developfrom
task/FOUR-32834
Open

FOUR-32834: Preserve Collection Record Control mode#1930
eiresendez wants to merge 1 commit into
developfrom
task/FOUR-32834

Conversation

@eiresendez

Copy link
Copy Markdown
Contributor

Issue & Reproduction Steps

When two Collection Record Controls use the same dynamic Record ID but different modes, resolving the Record ID causes both controls to display the Edit Screen.

To reproduce, configure two controls against the same collection using {{option}} as the Record ID, set one to Edit and the other to View, open Preview, and enter a valid record ID.

Expected behavior: Each control preserves its configured mode and loads the corresponding Update or Read Screen.

Actual behavior: Both controls load the Update Screen in Edit mode.

Solution

  • Resolve the effective mode from collectionmode.modeId whenever the dynamic Record ID changes.
  • Reuse the same mode resolution during initial mounting and subsequent record changes.
  • Preserve Edit as the fallback for legacy configurations without a collection mode.
  • Add regression coverage for controls with Edit and View modes sharing a dynamic Record ID.

How to Test

  • Run npx jest tests/unit/FormCollectionRecordControl.spec.js --runInBand.
  • Run ESLint against the new resolver and regression test.
  • Run npm run build-bundle.
  • Copy the generated dist/ contents into Core and run npm run dev.
  • In Screen 17 Preview, enter 1 in option and verify that the first control remains editable while the second displays its Read Screen.
  • The focused tests pass. The full Jest run reports 94 passing tests, while 7 existing suites fail before execution because of the repository's Vue/Jest transformation configuration.

Related Tickets & Packages

ci:deploy

@cypress

cypress Bot commented Aug 26, 2026

Copy link
Copy Markdown

screen-builder    Run #2362

Run Properties:  status check failed Failed #2362  •  git commit 52f2abbb93: FOUR-32834: Preserve Collection Record Control mode
Project screen-builder
Branch Review task/FOUR-32834
Run status status check failed Failed #2362
Run duration 09m 40s
Commit git commit 52f2abbb93: FOUR-32834: Preserve Collection Record Control mode
Committer Eleazar Resendez
View all properties for this run ↗︎

Test results
Tests that failed  Failures 1
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 19
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 392
View all changes introduced in this branch ↗︎

Tests for review

Failed  tests/e2e/specs/LoopFileUpload.spec.js • 1 failed test • CI - Chrome

View Output

Test Artifacts
FOUR-2164 Loop FileUpload > Test render of screen with Loop>FileUpload Test Replay Screenshots

@nolanpro

Copy link
Copy Markdown
Contributor

QA server K8S was successfully deployed https://ci-178ddcc9bb.engk8s.processmaker.net

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