FOUR-30436 | Record List Column Selector Does Not Show All Collection Fields When Configuring a Collection Source by mcraeteisha · Pull Request #1914 · ProcessMaker/screen-builder · GitHub
Skip to content

FOUR-30436 | Record List Column Selector Does Not Show All Collection Fields When Configuring a Collection Source#1914

Open
mcraeteisha wants to merge 1 commit into
developfrom
defect/FOUR-30436
Open

FOUR-30436 | Record List Column Selector Does Not Show All Collection Fields When Configuring a Collection Source#1914
mcraeteisha wants to merge 1 commit into
developfrom
defect/FOUR-30436

Conversation

@mcraeteisha

@mcraeteisha mcraeteisha commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Issue

Ticket: FOUR-30436

When a Record List screen control is configured with Collection as its Source of Record List, the column selector dropdown in the inspector silently drops fields once the chosen collection has more than ~12 columns. Fields that are unset/null on the first record are missing from the dropdown even though they exist on the collection.

Solution

getCollectionColumns() in column-setup.vue and collection-data-source.vue derived columns from Object.entries(firstRecord.data), so any field that was null/empty on the first record was invisible. The schema endpoint (GET /collections/{id}/columns) was already being fetched in collection-records-list.vue::getFields(), but the result never reached the dropdowns.

This PR threads the schema through the existing data flow:

  • collection-records-list.vue: added "fields" to CONFIG_FIELDS so the schema rides along on the v-model payload alongside collectionId, pmql, and dataRecordList. Reshaped getFields() to populate this.fields as [{ text, value }, …] from the columns endpoint, and reset it on collectionId clear to avoid stale leakage across collection swaps.
  • collection-data-source.vue and column-setup.vue: getCollectionColumns() now prefers the schema from the payload when populating the dropdown, with the first-record-derived path kept as a legacy fallback.
    The dropdown now reflects the collection's defined schema rather than just the keys present on the first record.

How To Test

  1. Import or create a collection with more than 12 columns. (You can use the Staff Claim Collection Workshop collection that is attached in the JIRA ticket).
  2. Import the screen 50358 Data Collection Records (also attached in the JIRA ticket).
  3. Inside the screen, select the existing record list control named GetDataCollectionRecords.
  4. In the Record List configuration panel, set Source of Record List to Collection.
  5. Select the collection Staff Claim Collection Workshop.
  6. Open the Columns section and click Add Column to display the column selector dropdown.
  7. Review the list of available fields shown in the dropdown and compare it with the actual columns configured in the collection.
  8. All of the columns configured in the collection should be shown in the Columns dropdown.

ci:deploy

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.

Use a forwarded `fields` array (when present on the v-model payload) to populate column/field options in inspector components instead of inferring columns from the first record.
@cypress

cypress Bot commented Jun 15, 2026

Copy link
Copy Markdown

@processmaker-sonarqube

Copy link
Copy Markdown

@eiresendez eiresendez self-requested a review June 22, 2026 15:40
@mcraeteisha

mcraeteisha commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

@mcraeteisha mcraeteisha requested review from sanjacornelius and removed request for eiresendez June 23, 2026 16:24
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