Skip to content

FOUR-32265: Normalize legacy data source IDs#1919

Open
eiresendez wants to merge 1 commit into
developfrom
bugfix/FOUR-32265
Open

FOUR-32265: Normalize legacy data source IDs#1919
eiresendez wants to merge 1 commit into
developfrom
bugfix/FOUR-32265

Conversation

@eiresendez

@eiresendez eiresendez commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Issue & Reproduction Steps

A Collection-backed Select List can trigger a Data Connector watcher whose saved script_id uses the legacy UI-prefixed format, such as data_source-7.

  1. Create a Collection with records.
  2. Configure a Select List to use the Collection.
  3. Add a Data Connector watcher that watches the Select List value.
  4. Use a watcher definition containing script_id: "data_source-7".
  5. Open the Screen preview, search for a Collection record, and select it.
  6. Observe the invalid POST request to /api/1.0/requests/data_sources/data_source-7 and the resulting 405 Method Not Allowed response.

The regression fixture is included in tests/e2e/fixtures/FOUR-6910_Watcher_Radio.json.

Solution

  • Normalize only exact legacy Data Source identifiers matching data_source-{digits} before constructing Data Source URLs.
  • Apply the compatibility handling at the DataProvider boundary for POST and cached GET requests.
  • Preserve numeric, canonical, and malformed identifiers without changing watchers, backend routes, or persisted Screen definitions.
  • Add unit and Cypress regression coverage for legacy and canonical identifier formats.

How to Test

  • Run npx jest tests/unit/DataProvider.spec.js --no-coverage --runInBand and confirm all 18 tests pass.
  • Start Vite with npm run dev -- --host 127.0.0.1, then run env -u ELECTRON_RUN_AS_NODE npm run run-cypress -- --spec tests/e2e/specs/SelectListWatcher.spec.js --browser chrome and confirm both tests pass.
  • Run npm run build and confirm the production bundle builds successfully.
  • In Screen preview, select a Collection record and confirm the watcher posts to /api/1.0/requests/data_sources/7, never /data_sources/data_source-7, and no 405 response occurs.

Related Tickets & Packages

ci:deploy

@eiresendez eiresendez self-assigned this Jul 16, 2026
@cypress

cypress Bot commented Jul 16, 2026

Copy link
Copy Markdown

screen-builder    Run #2297

Run Properties:  status check passed Passed #2297  •  git commit 85c42df014: FOUR-32265: Normalize legacy data source IDs
Project screen-builder
Branch Review bugfix/FOUR-32265
Run status status check passed Passed #2297
Run duration 09m 46s
Commit git commit 85c42df014: FOUR-32265: Normalize legacy data source IDs
Committer Eleazar Resendez
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
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 389
View all changes introduced in this branch ↗︎

@processmaker-sonarqube

Copy link
Copy Markdown

@vladyrichter

Copy link
Copy Markdown

QA server K8S was successfully deployed https://ci-4eca9cadc9.engk8s.processmaker.net

@eiresendez
eiresendez requested a review from mcraeteisha July 17, 2026 18:05
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.

3 participants