[MGNLUI-4101] LinkFieldFactory ignores workspaceName set on IdentifierToPathConverter Created: 14/Dec/16  Updated: 08/Mar/21  Resolved: 08/Mar/21

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

Type: Bug Priority: Neutral
Reporter: Philip Mundt Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: architecture
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to MGNLUI-1577 Make idKeyTranslator configurable in ... Closed
relates to MGNLUI-3683 Make LinkField a pure-Vaadin field, m... Closed
causality
caused by MGNLUI-1633 Adapt the current LinkField definitio... 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)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled

 Description   

The change brought in by MGNLUI-3683 basically makes any workspaceName set on the info.magnolia.ui.form.field.converter.IdentifierToPathConverter useless and it's basically ignored. This is due to the LinkFieldFactory overriding any workspaceName given with what it finds in its own definition (as targetWorkspace). Is the workspaceName of IdentifierToPathConverter? Is it deprecated now?

Problematic code snippet
IdentifierToPathConverter converter = definition.getIdentifierToPathConverter();
if (converter != null) {
    converter.setWorkspaceName(definition.getTargetWorkspace());
}
linkField.setTextFieldConverter(converter);

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