Review 11.3 Merged

70232[BUGFIX] Skip range validation if input value and default are both "0"

Oliver Hader CR +2 V +2 Normal +95 −26 updated 08/09/21, 17:38

Commit message

This patch fixes a regression originally introduced in #94103. The
problem there was simply an erroneous strict comparison, which further
got completely removed in #94527 due to a misconception.

The mentioned condition is important for date type fields with a lower
range set in TCA. If the user doesn't provide a value for that date
field, the range validation should be skipped. Otherwise this empty
value would always be interpreted as 0, resulting the validation to
change it to the lower range value.

As this is a special case, the condition was extracted and rewritten,
to only apply for this exact scenario. Other than that the validation
should not be skipped.

An acceptance test and a unit test are added to ensure this behavior
can't break anymore.

Review

  • Code review CR +2 Done
    • Oliver Hader +2
  • Verified V +2 Done
    • Oliver Hader +2
    • core-ci +1 CI

Issues 3

Files 3

Review log 79

  1. Oliver Hader uploaded patch set 1 08/05/21, 16:24

  2. core-ci voted on patch set 1 V -1 08/05/21, 16:35 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14155

  3. Nikita Hovratov commented on patch set 1 08/05/21, 16:38

    This patch is a prerequisite for the regression fix: https://review.typo3.org/c/Packages/TYPO3.CMS/+/70124
  4. Nikita Hovratov commented on patch set 1 08/05/21, 16:40

    Or remove the acceptance test like in 10.4 backport.
  5. Oliver Hader commented on patch set 1 08/09/21, 11:17

    @lolli: Any idea what might be wrong with acceptance tests here? Is it required to raise styleguid and/or testing-framework?
  6. Oliver Hader rebased onto patch set 2 08/09/21, 17:02

  7. core-ci voted on patch set 2 V +1 08/09/21, 17:30 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14383

  8. Oliver Hader voted on patch set 2 V +2 CR +2 08/09/21, 17:38

  9. Oliver Hader merged patch set 3 08/09/21, 17:38