Skip to content

FOUR-33295: [53481] MySql error - Syntax error or access violation in the query of groups table - #9063

Merged
nolanpro merged 1 commit into
developfrom
FOUR-33295
Sep 17, 2026
Merged

nolanpro merged 1 commit into
developfrom
FOUR-33295

Conversation

@pmPaulis

Copy link
Copy Markdown
Contributor

Issue & Reproduction Steps

[53481] MySql error - Syntax error or access violation in the query of groups table

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.

@pmPaulis pmPaulis self-assigned this Sep 17, 2026
@cursor

cursor Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Single-character-level SQL quoting change on an existing query path; a new unit test covers nested group resolution with no auth or data-model changes.

Overview
Fixes a MySQL syntax/access violation when resolving assignable users from nested groups on the raw execution path by quoting the table name in mergeGroupMemberUserIdsRaw (FROM groups → FROM `groups` ), since groups is treated as a reserved identifier in the failing query.

Adds testRawGroupAssignmentResolvesActiveNestedGroups, which exercises that private method via reflection and asserts a user in a child group is returned when assignment starts from a parent group.

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

@pmPaulis
pmPaulis requested a review from caleeli September 17, 2026 13:17
$groupPlaceholders = implode(',', array_fill(0, count($subGroupIds), '?'));
$activeGroups = DB::select(
"SELECT id FROM groups WHERE id IN ($groupPlaceholders) AND status = ?",
"SELECT id FROM `groups` WHERE id IN ($groupPlaceholders) AND status = ?",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider to use DB::table if possible

@decisions-sonarqube

Copy link
Copy Markdown

@nolanpro
nolanpro merged commit 4ee9e45 into develop Sep 17, 2026
8 of 10 checks passed
@nolanpro
nolanpro deleted the FOUR-33295 branch September 17, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants