-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 6.2.10 EE GA1, 6.2.X EE, 7.0.0 Beta 3
-
Fix Version/s: 6.2.X EE, 7.0.0 Beta 3
-
Component/s: Dynamic Data Mapping
-
Labels:
-
Branch Version/s:6.2.x
-
Backported to Branch:Committed
-
Story Points:1
-
Fix Priority:4
-
Git Pull Request:
Steps to reproduce
- Create a web content structure with a select field, the field should be required and multiple choice should be enabled as well
- Add a template for this structure
- Create a web content with this structure, add a title and do NOT select any of the options in the select field
- Publish
Expected behaviour
As the select field is required, a validation error should occur because the field is left untouched.
Actual behaviour
No validation error appears.
additional info
On master creating a web content structure is impossible, so it can not be reproduce.
However it can be easily reproduce on 6.2.x and it the code clearly shows that the bug exists
root cause
The root cause is in DDMXMLImpl.java, getFields method.
List<Element> dynamicContentElements = dynamicElementElement.elements("dynamic-content"); for (Element dynamicContentElement : dynamicContentElements) {
Here the dynamicContentElements is empty because the user did not choose any option from the multi-select field.
Unfortunately in this case the getFields method will not return with the select field so later the code will not check if it is required or not.
- causes
-
LPS-66833 The required label does not display on required radio fields when creating new dynamic data list records
- Verified
- is duplicated by
-
LPS-58866 Dynamic Data Lists checkbox field cannot be set as required on the UI
- Closed
- relates
-
LPS-62622 Adding content with multi-select field with no selected options throws exception
- Closed
-
LPE-14682 Required property of multi-select field is not validated for web content
-
- Closed
-
- Testing discovered
-
LPS-61856 Unselecting a multi-select field is not possible when editing a web content
- Closed