Skip to content

FOUR-33534 Error Loading Items in saved search with Participant user - #9077

Merged
nolanpro merged 3 commits into
developfrom
FOUR-33534
Sep 28, 2026
Merged

nolanpro merged 3 commits into
developfrom
FOUR-33534

Conversation

@devmiguelangel

@devmiguelangel devmiguelangel commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Issue & Reproduction Steps

Error Loading Items in saved search with Participant user

Solution

The Saved Search Available Columns returns a 500 with MySQL error 1038 when column discovery sorts a request whose data JSON is larger than sort_buffer_size. This happens for any PMQL with no process scope, including requester = "...". The user's role is not involved.

  • Column discovery still uses the Saved Search PMQL, but it no longer sorts rows that include data.
  • The id sample is ORDER BY id DESC LIMIT 25, and it skips payloads larger than 1MB.
  • data is loaded for those ids with no ORDER BY.
  • MySQL error 1038 is logged and treated as an empty sample, so default columns still return 200. Any other database error is rethrown.
CleanShot.2026-09-25.at.15.36.29.mp4

Related Tickets & Packages

FOUR-33534
https://github.com/ProcessMaker/package-savedsearch/pull/700

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.

ci:package-savedsearch:FOUR-33534

@cursor

cursor Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Small controller return-path fix plus feature tests; behavior change is avoiding a redundant query, not new API semantics in this diff.

Overview
Fixes double pagination on the Variable Finder path in ProcessVariableController: the list endpoint now returns the paginator built once instead of calling paginate() again, so page metadata and rows stay aligned (including when onlyAvailable merges saved-search columns).

Test suite changes defer heavy process/variable seeding to tests that need it, and add coverage for requester PMQL saved searches with empty processIds, onlyAvailable filtering, large request data, simulated MySQL 1038 sort memory during id sampling, and scoping so other requesters’ fields are not exposed.

Reviewed by Cursor Bugbot for commit 671ccb6. Bugbot is set up for automated code reviews on this repo. Configure here.

@devmiguelangel devmiguelangel self-assigned this Sep 25, 2026
@decisions-sonarqube

Copy link
Copy Markdown

@nolanpro
nolanpro self-requested a review September 28, 2026 18:47
@nolanpro
nolanpro merged commit dbb1dbb into develop Sep 28, 2026
10 checks passed
@nolanpro
nolanpro deleted the FOUR-33534 branch September 28, 2026 21:42
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