[MGNLUI-4113] "selected" property is ignored for new select field added into an existing dialog Created: 04/Jan/17  Updated: 08/May/17  Resolved: 17/Feb/17

Status: Closed
Project: Magnolia UI
Component/s: dialogs
Affects Version/s: 5.4.9, 5.5
Fix Version/s: 5.4.12, 5.5.3

Type: Bug Priority: Critical
Reporter: Frank Sommer Assignee: Khuong Nguyen
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 7d
Original Estimate: 2.5d

Issue Links:
causality
is causing MGNLUI-4205 Setting "selected" is true in Select ... Closed
relation
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
Date of First Response:
Visible to:
Diana Racho, Gino Esposto, Jean-Marc Fazan, Rainer Blumenthal
Sprint: Saigon 82, Saigon 83
Story Points: 3

 Description   

Steps to reproduce:

  1. Add a new select field to an existing dialog
  2. Mark the second option as selected
  3. Open the dialog for an already created component node
  • the first option is displayed --> so the editor thinks that this is the current selected option

The selection works only for new created component nodes, not for existing nodes.

I found several issues related to this:



 Comments   
Comment by Mikaël Geljić [ 06/Feb/17 ]

First, default values are only applied when the item is new (in case of JCR item), but I agree the first option should only be selected also when this item is new. Should be blank otherwise.

SelectFieldFactory should override #setPropertyDataSourceDefaultValue or #createDefaultValue instead of #setPropertyDataSourceAndDefaultValue.

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