Review main Merged

95585[TASK] Add DataScenarios tests for unique value evaluation

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

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

Issues 3

Files 13

Review log 67

  1. Benni Mack uploaded patch set 1 09/02/26, 22:52

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

  3. Stefan Bürk commented on patch set 1 CR +1 V +1 09/03/26, 06:10

    composer.json:8

    This needs to be adjusted on backport, commenting only so it's not missed.
  4. Benni Mack commented on patch set 1 09/03/26, 06:13

    composer.json:8 Reply

    Done
  5. Oliver Klee voted on patch set 1 V +1 09/03/26, 06:51

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

  7. Benni Mack merged patch set 2 09/03/26, 09:36