If there is a catalog item with a UI Policy associated with it and the UI Policy is used to make a variable not mandatory and not visible based on a condition on the catalog view, errors display when the item is ordered.
At the RITM or Task level, an error is seen if any changes are made to the forms, for example, adding a work note. An error message is displayed stating that the variable that was hidden and made not mandatory via a UI Policy is not populated.
Steps to Reproduce
- Create a test catalog item in a subprod Kingston instance
- Within that test catalog item, create three variables: two single-line and one checkbox variable.
- Create a UI Policy for that catalog item.
- Within the UI Policy, include the condition that states If checkbox is true.
- Set the Applies on a Catalog item view, Applies on Catalog Tasks and Applies on Requested Items checkboxes to true.
- In the Catalog UI Policy Actions, add one action for each of the single line text variables.
- For one of the single-line text variables, set the Mandatory and Visible values to true.
- For the other single-line text variable, set the Mandatory and Visible values to false.
- Save the UI Policy.
- Order the test catalog item and go to the RITM.
- Try to add something to the work notes and click Save.
An error is displayed that says to fill in the mandatory variable that was set to false using the UI Policy.
- Create a new property in the [sys_properties] table with the following values:
- Name: glide.sc.use_sc_form_v2
- Type: TRUE/FALSE
- Value: FALSE
- Import the attached onLoad client script XML.
For more information, see Add a system property.
Related Problem: PRB1241469