Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
Master
-
5
-
Forms_7.3_30, App_Builder_7.3_31
Description
Description
Should not be possible to save a Form View containing a broken rule.
Steps to Reproduce SCENARIO 1
- Go to Global Menu > Applications > App Builder > Objects > Add a Custom Object;
- Add a Form View > Add some fields;
- Go to the Rules tab > Add a new rule using those fields > Save the Form;
- Reopen the Form > Remove a field from the Form Builder;
- Obverse that the field is not shown in the rules summary;
- Try to save the Form;
- Observe the message shown: "Error:Unable to parse expression "not(equals(getValue('Field41473544'), ))";
Steps to Reproduce SCENARIO 2
- Go to Global Menu > Applications > App Builder > Objects > Add a Custom Object;
- Add a Form View > Add a Text field;
- Go to the Rules tab > Add a new rule using these fields "IF Text is not empty SHOW Text" > Save the rule > Save the Form;
- Reopen the Form > Remove the Text field from the Form View only;
- Obverse that the field is not shown in the rules summary since the rule is broken;
- Add a new Text field to the form body > Save the Form (it should not be possible when the scenario 1 is fixed);
- Reopen the Form > go to the Rules tab > observe the rule is broken (since it was pointing to the old field);
- Edit the rule filling it using the added Text field > Save the rule > Try to Save the Form;
- Observe the message shown: "status: "INTERNAL_SERVER_ERROR"
title: "java.util.ArrayList cannot be cast to [Lcom.liferay.dynamic.data.mapping.spi.converter.model.SPIDDMFormRuleCondition;"";
Expected Result
SCENARIO 1:
- The Form View should not be saved and the following message is displayed:
- The message shown is should be "ERROR: There are invalid rule expressions."
SCENARIO 2:
- The Form View should not be saved while there is a broken rule even after adding a new field to the form view body.
Actual Result
SCENARIO 1:
- The Form View is not saved and the following message is displayed:
- "Error:Unable to parse expression "not(equals(getValue('Field41473544'), ))";
SCENARIO 2:
- The Form View is saved even with a broken rule, and after editing a rule to the new field the following message is displayed:
- status: ERROR: "INTERNAL_SERVER_ERROR"
title: "java.util.ArrayList cannot be cast to [Lcom.liferay.dynamic.data.mapping.spi.converter.model.SPIDDMFormRuleCondition;"";
Reproduced In
master: 1686865f4fc165324741c6ad64f945df68e0e07b
Attachments
Issue Links
- depends on
-
LPS-119290 The user is not alerted that he cannot save a form due to a broken rule. Instead, he is led to believe his changes were properly edited/saved, but when reopening the changes were restored
- Closed
- is related to
-
LPS-116388 The Form Builder breaks when the user removes one field which is being used in the rules
- Closed