Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-4427

Disambiguating duplicate field-types

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Neutral Neutral
    • 5.6.6
    • None
    • None
    • None
    • Yes
    • Yes
    • Basel 145, Basel 147
    • 8

      User story:

      As a developer, I have two fields: textField and text. They are both bound to the same field definition class. Which one to pick and why? (If the lookup is still happening by definition class.)

      Investigate and prototype how (and if) the field selection process can work in the pressence of:

      • Two fieldtype definitions have the same definition class.
      • One of them is deprecated.
      • The deprecated one is decorated.

      In general the non-deprecated fieldType should be chosen.

      However if the deprecated one is also decorated - then that one should be chosen.

       

      Context:

      As part of the effort to allow fields to be referenced by name in a form, we want to rename some fields to make the naming consistant. To do this we create new fieldTypes with the new name, and deprecate the existing field types.

      See: "Disambiguating duplicate field-types" here: https://wiki.magnolia-cms.com/display/ARCHI/2018-04-10+Reference+fields+by+name%2C+rename+field+types

      Proposed solution:
      info.magnolia.ui.form.fieldtype.registry.FieldTypeDefinitionRegistry#getByDefinition will be adjusted to behave in favour of non-deprecated or decorated types when queried.

        Acceptance criteria

              ilgun Ilgun Ilgun
              czimmermann Christopher Zimmermann
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Task DoD