Review 14.3 Merged

95598[TASK] Add DataScenarios tests for unique value evaluation

Benni Mack CR +2 V +2 Expert +1228 −217 updated 09/03/26, 11:37

Commit message

The "eval" keywords "unique", "uniqueInSite" and "uniqueInPid"
were covered by two isolated test cases only. Both called
DataHandler->getUnique() directly or faked unique fields by
manipulating $GLOBALS['TCA'] at runtime, and neither of them
touched workspaces.

They are replaced by a regular DataScenarios setup that drives
real DataHandler operations for all three keywords, on type=input
as well as on type=slug fields, in live and in a workspace, and
covers modifying, discarding, publishing a single record and
publishing the whole workspace.

A couple of assertions document current, wrong behaviour, so the
follow-up bugfixes have a baseline to flip:

* Editing a record in a workspace appends a counter to unique
  input fields, even when nothing was changed at all (#101227).
* Publishing never transfers unique input fields to the live
  record, so the edit is silently dropped (#52070).
* Moving a record evaluates "uniqueInPid" against the source
  page instead of the target page.

Review

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

Issues 3

Files 13

Review log 57

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

    Cherry Picked from branch main. The following files contain Git conflicts: * typo3/sysext/core/Tests/Functional/DataHandling/DataHandler/GetUniqueTest.php * typo3/sysext/core/Tests/Functional/DataHandling/DataHandler/GetUniqueTranslationTest.php
  2. Benni Mack commented on patch set 2 09/03/26, 09:40

    Published edit on patch set 1.
  3. core-ci voted on patch set 1 V -1 09/03/26, 09:51 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107737

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

  5. Benni Mack marked it ready for review 09/03/26, 11:37

  6. Benni Mack voted on patch set 2 CR +2 V +2 09/03/26, 11:37

  7. Benni Mack merged patch set 3 09/03/26, 11:37