Skip to content

Conversation

@eiresendez
Copy link
Contributor

@eiresendez eiresendez commented Nov 22, 2025

Issue & Reproduction Steps

When using “Save as PM Block”, the Select List inside the cloned Screen loses its Data Connector selection: the dropdown shows no selected connector/endpoint.

Repro: create a process with a Screen containing a Select List bound to a Data Connector; click “Save as PM Block”; open the generated PM Block’s Screen in the Screen Builder—Data Connector and End Point are unselected.

Solution

  • Allow PM Block Data Connectors (asset_type = PM_BLOCK) to be included in the nonSystem scope so they are returned by /api/data_sources and visible in the builder.
  • Ensure the Select List import remaps selectedDataSource as an integer ID so the builder pre-selects the cloned Data Connector.
  • Added targeted tests to prevent regressions for both the scope change and the Select List remap.

How to Test

  1. Create a process with a Screen that has a Select List configured to a Data Connector and save it as a PM Block.
  2. Open the PM Block’s Screen in the Screen Builder: the Data Connector should already be selected and the End Point set to GET.
  3. API check: GET /api/1.0/data_sources should list both regular and PM Block Data Connectors.

Run focused tests:

  • php artisan test --filter=SelectedDataSourceIsStoredAsInteger
  • php artisan test --filter=DataSourceNonSystemScopeTest

Related Tickets & Packages

Code Review Checklist

  • I have pulled this code locally and tested it on my instance, along with any associated packages.
  • This code adheres to ProcessMaker Coding Guidelines.
  • This code includes a unit test or an E2E test that tests its functionality, or is covered by an existing test.
  • This solution fixes the bug reported in the original ticket.
  • This solution does not alter the expected output of a component in a way that would break existing Processes.
  • This solution does not implement any breaking changes that would invalidate documentation or cause existing Processes to fail.
  • This solution has been tested with enterprise packages that rely on its functionality and does not introduce bugs in those packages.
  • This code does not duplicate functionality that already exists in the framework or in ProcessMaker.
  • This ticket conforms to the PRD associated with this part of ProcessMaker.

Note

Cursor Bugbot is generating a summary for commit ac320fe. Configure here.

@eiresendez
Copy link
Contributor Author

eiresendez commented Nov 22, 2025

Hi @sanjacornelius when you have a chance, could you review this? My question is the following:

Does everything related to a PM Blocks have to remain hidden from the end user? This is the root cause of the issue “DevLink does not import Data Connector dependencies inside PM Blocks” — it is imported correctly and mapped correctly, the problem is that it gets hidden in the changed line.

Edited:
I’m going to take a different approach! Because I see that indeed the PM block type screens are excluded, so it’s the same with data connectors. I’m going to try to make a fix just for this use case

@processmaker-sonarqube
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@eiresendez
Copy link
Contributor Author

closing PR, this is not necessary

@eiresendez eiresendez closed this Nov 24, 2025
@eiresendez eiresendez removed the request for review from sanjacornelius November 24, 2025 14:48
@eiresendez eiresendez deleted the bugfix/FOUR-27977 branch January 15, 2026 15:22
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