[MGNLUI-4427] Disambiguating duplicate field-types Created: 12/Apr/18  Updated: 14/May/18  Resolved: 08/May/18

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: None
Fix Version/s: 5.6.6

Type: Improvement Priority: Neutral
Reporter: Christopher Zimmermann Assignee: Ilgun Ilgun
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to MAGNOLIA-7318 DialogDefinitionValidator should hand... Accepted
dependency
is depended upon by MGNLUI-3882 Reference fields by name as well as b... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Release notes required:
Yes
Documentation update required:
Yes
Epic Link: LD: Simple dialog config
Sprint: Basel 145, Basel 147
Story Points: 8

 Description   

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.


Generated at Mon Feb 12 09:16:30 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.