Review 14.3 Merged

95568[BUGFIX] Order record history creation and deletion lookups

Benni Mack CR +2 V +2 Easy +32 −0 updated 09/02/26, 14:50

Commit message

RecordHistory->getCreationInformationForRecord() and
RecordHistory->getUserIdFromDeleteActionForRecord() both limited their
query to one row without ordering it, so the returned entry was
whichever one the database happened to deliver first.

A record can be deleted, undeleted and deleted again, and publishing a
workspace version migrates its "add" entry onto the live record, so
both queries can match more than one row. The recycler shows the
result as "deleted by" and the element information modal as "created
by", where a wrong user is not obvious as such.

Order the deletion lookup by uid descending, since the most recent
deletion is the one the record is currently in, and the creation
lookup by uid ascending, since the oldest entry is the actual
creation.

The queries stay unrestricted by workspace on purpose: ordering
already picks the right entry, while a restriction would hide the
creation of a record that was created in a workspace and published
later.

Review

  • Code review CR +2 Done
    • Benni Mack +2
  • Verified V +2 Done
    • Benni Mack +2
    • core-ci +1 CI

Issues 1

Files 3

Review log 34

  1. Benni Mack commented on patch set 1 09/02/26, 14:39

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 09/02/26, 14:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107642

  3. Benni Mack voted on patch set 1 CR +2 V +2 09/02/26, 14:50

  4. Benni Mack merged patch set 2 09/02/26, 14:50