#110588Workspace stage change and publish history entries carry no correlation id
Description
Workspaces\Hook\DataHandlerHook::getRecordHistoryStore() builds the RecordHistoryStore without the DataHandler’s CorrelationId, and none of its three call sites pass one either — changeStageForRecord() in version_setStage() and the two publishRecord() calls in version_swap()
and publishNewRecord().
RecordHistoryStore::createCorrelationId() therefore falls back to CorrelationId::forSubject(md5($table . ':' . $uid)), which has no scope.
Observed for one workspace edit, followed by a stage change and a publish:
#1 ADD tt_content:3 ws=1 scope=OQfCAxitYP0G8xJFEgjjkRTQKh-Qn1KU #2 ADD tt_content:1 ws=1 scope=OQfCAxitYP0G8xJFEgjjkRTQKh-Qn1KU #3 MODIFY tt_content:1 ws=1 scope=OQfCAxitYP0G8xJFEgjjkRTQKh-Qn1KU #4 ADD tt_content:5 ws=1 scope=OQfCAxitYP0G8xJFEgjjkRTQKh-Qn1KU #5 STAGE tt_content:1 ws=1 scope=<none> #6 PUBLISH tt_content:1 ws=0 scope=<none>
(Rows #2, #3 and #5 were written for the workspace version uid 4 and repointed to the live uid 1 by the publish.)
Two effects:
- Stage changes and publishes cannot be correlated with the operation that caused them. A “publish all” of 40 records writes 40 rows that cannot be tied back to that one action.
- The fallback id is deterministic and constant per record, so every stage change and every publish of the same record shares one
correlation_idfor the record’s entire lifetime.RecordHistory::findEventsForCorrelation()returns all of them at once, mixed across unrelated operations.
Regular DataHandler operations are unaffected: a single run that creates, modifies, moves and deletes records already writes every entry under the
correlation scope of the outermost instance.
Expected: pass the DataHandler CorrelationId into getRecordHistoryStore() and on to all three calls.
Reviews 2
History 25
-
Gerrit Code Review pushed patch set 1 for main to change 95558 status
NewUnder Review <span data-processor="relativetime" data-value="2026-09-02T10:56:51+00:00" > 09/02/26, 10:56 </span> -
Gerrit Code Review pushed patch set 2 for main to change 95558 <span data-processor="relativetime" data-value="2026-09-02T10:57:26+00:00" > 09/02/26, 10:57 </span>
-
Gerrit Code Review pushed patch set 1 for 14.3 to change 95562 <span data-processor="relativetime" data-value="2026-09-02T13:07:31+00:00" > 09/02/26, 13:07 </span>
-
Benni Mack commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-09-02T13:10:10+00:00" > 09/02/26, 13:10 </span> -
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2026-09-08T10:03:19+00:00" > 09/08/26, 10:03 </span>
Applied in changeset commit:7d7d6f23e4dad292eb6a03bfdc7a681c35eb3db9.