#110590Publishing a new workspace record rewrites unrelated history entries
Description
Workspaces\Hook\DataHandlerHook::publishNewRecord() calls RecordHistoryStore::publishRecord($table, $id, 0, ...) — the versioned uid is 0 because a record created in a workspace keeps its uid when published.
publishRecord() then calls migrateWorkspaceHistory() unconditionally, which executes:
UPDATE sys_history SET recuid = <liveUid> WHERE tablename = <table> AND recuid = 0
With $versionedId = 0 this matches every sys_history row of that table whose recuid is 0 and rebinds them to an unrelated record. The statement is additionally not restricted to the workspace being published.
Expected: skip the migration when $versionedId <= 0, and restrict the update to the workspace the record is published from.
Introduced with #102381.
Reviews 2
History 26
-
Gerrit Code Review pushed patch set 1 for main to change 95574 status
NewUnder Review <span data-processor="relativetime" data-value="2026-09-02T16:44:45+00:00" > 09/02/26, 16:44 </span> -
Gerrit Code Review pushed patch set 2 for main to change 95574 <span data-processor="relativetime" data-value="2026-09-02T16:45:26+00:00" > 09/02/26, 16:45 </span>
-
Gerrit Code Review pushed patch set 1 for 14.3 to change 95576 <span data-processor="relativetime" data-value="2026-09-02T18:10:24+00:00" > 09/02/26, 18:10 </span>
-
Gerrit Code Review pushed patch set 2 for 14.3 to change 95576 <span data-processor="relativetime" data-value="2026-09-02T18:16:45+00:00" > 09/02/26, 18:16 </span>
-
Benni Mack commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-09-02T18:30:10+00:00" > 09/02/26, 18:30 </span> -
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2026-09-08T10:03:20+00:00" > 09/08/26, 10:03 </span>
Applied in changeset commit:15ce934da0111ef8d0e749ae1d3d80e92d0b3020.