Review main Merged

95563[BUGFIX] Order record history creation and deletion lookups

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

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
    • Georg Ringer +1
    • Wouter Wolters +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 79

  1. Benni Mack uploaded patch set 1 09/02/26, 13:08

  2. Benni Mack updated the commit message in patch set 2 09/02/26, 13:09

  3. core-ci voted on patch set 1 V +1 09/02/26, 13:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107625

  4. core-ci voted on patch set 2 V +1 09/02/26, 13:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107626

  5. Wouter Wolters voted on patch set 2 CR +1 09/02/26, 13:27

  6. Stefan Bürk voted on patch set 2 CR +1 V +1 09/02/26, 14:06

  7. Georg Ringer voted on patch set 2 CR +1 V +1 09/02/26, 14:38

  8. Benni Mack voted on patch set 2 CR +2 V +2 09/02/26, 14:39

  9. Benni Mack merged patch set 3 09/02/26, 14:39