169 views

Description

If you use a rule base to include an item on an order guide based on a checkbox variable, the item does not get removed if the variable gets unchecked. This can result in items being appended to orders when they shouldn't be. Please note, this only happens if using the SC Order Guide Deprecated widget in London; the same widget in Kingston and Jakarta (SC Order Guide) works as expected.

See attachment: order_guide_issue.png

Steps to Reproduce

1) Navigate to Service Portal > Pages
2) Find the sc_cat_item_guide entry in the list and select it
3) In the Related Links, click Open in Designer
4) Delete the SC Order Guide widget and replace it with: SC Order Guide Deprecated
5) From any list, import the item_option_new and sc_cat_item_guide_items xml files attached
6) Go to the Service Portal and find the New Hire item
7) Click the Add Ipad 3 checkbox and notice the items list on the right is updated with an iPad 3
8) Uncheck the Add Ipad 3 checkbox and notice the iPad is not removed from the items list

Expected Behavior: The iPad item gets removed from the item list when the checkbox is unselected

Actual Behavior: The iPad item remains, even if checkbox is not checked

Workaround

The workaround is to clone the deprecated widget and make the following change in the client script.

----Change this:

$scope.$on("field.change", function(evt, parms) {
if (parms.newValue == parms.oldValue)
return;
 
if (!parms.field.guide_implications)
return;
 
if ($scope.data.sc_cat_item.cascade)
cascadeSingleVarToItems(parms.field);
evalIncludes();
})
 
----to:
 
$scope.$on("field.change", function(evt, parms) {
evalIncludes();
if (parms.newValue == parms.oldValue)
return;
 
if (!parms.field.guide_implications)
return;
 
if ($scope.data.sc_cat_item.cascade)
cascadeSingleVarToItems(parms.field);
})
 
 

 


Related Problem: PRB1304739

Seen In

There is no data to report.

Intended Fix Version

Madrid

Safe Harbor Statement

This "Intended Fix Version" information is meant to outline ServiceNow's general product direction and should not be relied upon in making a purchasing decision. The information provided here is for information purposes only and may not be incorporated into any contract. It is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. The development, release, and timing of any features or functionality described for our products remains at ServiceNow's sole discretion.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-10-09 07:50:59
Published:2018-10-09