Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-11795

Write namespace updater script

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • None
    • 13.3.0
    • None
    • None
    • 3
    • Tiger
    • Tiger Sprint 209, Tiger Sprint 210

    Description

      The script must check the hipposysedit:validators property of all fields and perform the following changes:

      • For required fields that have both the "required" and the "non-empty" validator, remove the "non-empty" validator. Fields no longer need a "non-empty" validator next to a "required" validator.
      • For fields that are neither "required" nor "optional" but do have a "non-empty" validator, log an INFO message. These fields are effectively optional (the property can be non-present by default), but if it's present it must contain a non-empty string. Because they are not optional, it's not possible to remove the value again once it's set. Probably projects should either make such fields "optional" or "required". Since we cannot know the intent the safe option is to just keep the existing "non-empty" check and log a helpful message instead with the suggestion to either make the field "optional" (by adding the "optional" 'validator') or make it "required" (and remove the "non-empty" validator).
      • For Html fields that are not "required" but use the "non-empty" validator, rename the "non-empty" validator to "non-empty-html". The old "non-empty" validator was a "hybrid" one, trigger either String-based or Html-based validation based on the type of the field. The new code base has two independent validators for these cases ("non-empty" for String fields and "non-empty-html" for Html fields). Like String fields with only a "non-empty" validator, the only sensible case here is an "optional" field: the property can be non-present, but if it's present it must contain non-empty HTML. Log a similar warning in this case.
      • Rename any usage of "resource-required" to "required". Resource fields used to get a special validator "resource-required" instead of "required", but these are now part of the "required" validator.

      Attachments

        Issue Links

          There are no Sub-Tasks for this issue.

          Activity

            People

              Unassigned Unassigned
              mmetternich Michael Metternich
              Product Management Team Product Management Team
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: