Issue Bug Closed

#110589Record history creation and deletion lookups return an arbitrary entry

Benni Mack 09/01/26, 19:28 updated 09/08/26, 10:03

Description

RecordHistory::getCreationInformationForRecord() and RecordHistory::getUserIdFromDeleteActionForRecord() both use setMaxResults(1) without an ORDER BY and without a workspace restriction.

For a record that was deleted, undeleted and deleted again, or that exists in more than one workspace, the returned row is whichever one the DBMS happens to deliver first. These two methods feed the “deleted by” column of the recycler and the “created by” line of the element information modal, so both can show the wrong user.

Expected: order the queries explicitly — the first ACTION_ADD entry and the latest ACTION_DELETE entry — and restrict them to the relevant workspace.

Reviews 2

History 25

  1. Benni Mack commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-09-02T14:45:08+00:00" > 09/02/26, 14:45 </span>

    Applied in changeset commit:46b24200b84a0cd935f579905a4a0c3d1daccb6c.