33 views

Description

Jakarta - Catalog UI Policy's action cannot set Label type variables to mandatory.

Used to work in Helsinki.

Steps to Reproduce

  1. Log into OOB Jakarta instance.
  2. Navigate to Service Catalog > Catalog Definitions > Maintain Items.
  3. Create a new test item by clicking New. Fill in the Name field and click Submit.
  4. Post submitting, access the new item record and under Variables related list, create the following three variables:
    1. Type: Label
      • Question: label
      • Name: label
      • Order: 0
    2. Type: Checkbox
      • Question: test1
      • Name: test1
      • Order: 10
    3. Type: Checkbox
      • Question: test2
      • Name: test2
      • Order: 20
  5. Post creating those variables, go back to the newly created catalog item record.
  6. Under Catalog UI Policies related list, click New for creating a new Catalog UI Policy.
    • Under When To Apply, in Catalog Conditions add:
    • test1 is false.
    • test2 is false.
    • Click Submit.
    • Once created, under it is Catalog UI Policy Actions related list, add a new record:
    • Variable name: label
    • Mandatory: True.
    • Click Submit.
  7. Under new item record, click Try It.
  8. Notice variable label is not mandatory.

    Variable type Label is not getting mandatory regardless of the conditions defined in the UI policy.

Workaround

This is expected behavior and in fact the functionality was actually not working correctly in previous releases such as Helsinki, where the Label variable was showing with an asterix to indicate mandatory. 
 
Basically, mandatory on Label variables was never supported as per documentation below: 
>>>>> https://docs.servicenow.com/bundle/jakarta-it-service-management/page/product/service-catalog-management/concept/c_ServiceCatalogUIPolicy.html 
 
The fact that red * was shown in Helsinki was a wrong behavior and it never supported a true mandatory check. 
 
To make the checkbox mandatory, set any of the checkbox as mandatory as documented here: 
>>>>> https://docs.servicenow.com/bundle/jakarta-it-service-management/page/product/service-catalog-management/reference/r_VariableTypes.html#r_VariableTypes__sect_CheckBox 
 
So, the workaround here would be to, instead of setting the label variable as mandatory, set one of the checkbox variables as mandatory and this should make the checkboxes mandatory. 

Related Problem: PRB1238448

Seen In

There is no data to report.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-04-09 04:32:47
Published:2018-04-09