Affects Version/s: 6.2.10 EE GA1, 6.2.X EE
Fix Version/s: 6.2.X EE
Component/s: Dynamic Data Mapping
Backported to Branch:Committed
Sprint:Sprint 10: Feb, 01 - Feb, 19, Sprint 13: Mar, 21 - Apr, 01
Git Pull Request:
- Create a web content structure with a select field, the field should be multiple choice
- Add a template for this structure
- Create a web content with this structure, add a title and select any of the options in the select field
- Edit this web content
- Unselect the previously selected option (ctrl+click)
- Publis it and Edit
No one option should be selected
The previously selected option is selected
On master creating a web content structure is impossible, so it can not be reproduced.
However it can be easily reproduced on 6.2.x and the code clearly shows that the bug exists
The root cause is in DDMImpl.java, mergeFields method.
The merge walks through the new fields and and adds it to the existing fields if it is new and return with the updated existing fields.
However, in our case, a field is missing from new fields, so it should be removed from existing fields, but the algorithm does not take it into account.
When removing a field from existing fileds take into account, that non-localizable fields are not in the request, so non-localizable fields should not be deleted from existingfields. The reason, why non-localizable fields are not in the request is that when they showed during adding translation they are simple html texts, not read-only fields.