Feature: #89143 - Allow rollback for a set of record history entries

See Issue #89143

Description

To allow rollbacks for a set of record history entries, it is now possible to add a correlationId while creating the RecordHistory entry. The correlationId should be an UUID but could also be any string which is useful to identify a set of entries.

To use this feature, an additional parameter $correlationId has been added to the following methods of \TYPO3\CMS\Core\DataHandling\History\RecordHistoryStore:

  • addRecord(string $table, int $uid, array $payload, CorrelationId $correlationId = null)
  • modifyRecord(string $table, int $uid, array $payload, CorrelationId $correlationId = null)
  • deleteRecord(string $table, int $uid, CorrelationId $correlationId = null)
  • undeleteRecord(string $table, int $uid, CorrelationId $correlationId = null)
  • moveRecord(string $table, int $uid, array $payload, CorrelationId $correlationId = null)

To resolve all entries for a given $correlationId a new method has been added to the \TYPO3\CMS\Core\DataHandling\History\RecordHistory class:

  • \TYPO3\CMS\Core\DataHandling\History\RecordHistory::findEventsForCorrelation(string $correlationId): array