[MGNLUI-4205] Setting "selected" is true in Select field doesn't work in case of existing item Created: 08/May/17 Updated: 03/Aug/17 Resolved: 09/May/17 |
|
| Status: | Closed |
| Project: | Magnolia UI |
| Component/s: | None |
| Affects Version/s: | 5.4.12, 5.5.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Oanh Thai Hoang | Assignee: | Unassigned |
| Resolution: | Not an issue | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| 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: | |||||||||||||||||
| Description |
Step to reproduce:
Observation: Select field doesn't select Test 1 Source of problemSince code was introduced from
public void setPropertyDataSourceAndDefaultValue(Property property) {
this.field.setPropertyDataSource(property);
if ((item instanceof ItemAdapter && ((ItemAdapter) item).isNew() && property.getValue() == null) || (!(item instanceof ItemAdapter) && property.getValue() == null)) {
setPropertyDataSourceDefaultValue(property);
}
}
so in case of item is existed like contact item, #setPropertyDataSourceDefaultValue will never call |
| Comments |
| Comment by Mikaël Geljić [ 09/May/17 ] |
As I wrote on What would happen if we applied default values for existing items? By renaming a contact, you are opening a dialog with a pre-existing item. It does not matter if the dialog definition changed. |