Notifications

46 views

Description

1. "Ask for Approval" Due Date Rules not working as expected in Orlando
2. When the "Ask for Approval" action Rules is configured for Due Date Reject if pending by Actual date <date> and the <date> is calculated via a script in a custom action, the approval record becomes No longer required.
3. This is only when the system date format is dd-MM-yyyy
4. It works fine when the date format is yyyy-MM-dd
5. It works fine in NY for any system date format

Steps to Reproduce

1. On any OOB Orlando instance, Go to System Properties > System change the Date format to dd-MM-yyyy > Save
2. Import the attached update set and commit it (even if it shows any error)
3. It contains cat item "SNC TEST ITEM 1" ; Flow "Approval Due Tests" and Action "Return Date and Time"
4. Open "SNC TEST ITEM 1" > Try it > Submit /com.glideapp.servicecatalog_cat_item_view.do?v=1&&sysparm_id=5bcdaeb1db019050016d853339961940
5. Open the RITM (make sure REQ is approved to trigger the flow)
6. After a few seconds, the approval generated for the RITM changes to No Longer Required
7. Go to System Properties > System change the Date format to yyyy-MM-dd > Save
8. Repeat steps 3-6
9. Open the RITM, its approval stays Requested

Workaround

Create a custom action which outputs a string rather than a Date or Date/Time.  Drag the output of the customer action to Due Date field.

In the custom action use the code on these lines:
////////////
(function execute(inputs, outputs) {
var currDate = new GlideDate();
currDate.setValue(inputs.date);
var addDays = parseInt(inputs.days);
currDate.addDaysLocalTime(addDays);
var dateStr = currDate.getByFormat("yyyy-MM-dd").toString();
gs.info(dateStr);
outputs.duedate = dateStr;
})(inputs, outputs);


Related Problem: PRB1410941

Seen In

SR - IRM - Audit Management - New York 2019 Q3
SR - IRM - GRC Profiles - Madrid 2019 Q2
SR - IRM - Policy and Compliance - Madrid 2019 Q2
SR - IRM - Risk Management - New York 2019 Q3
SR - ITOM - Discovery and Service Mapping - 201908
SR - ITOM - Discovery and Service Mapping - v1.0.35
SR - Security - Integration Framework - Madrid 2019 Q2
SR - Security - Support Common - Madrid 2019 Q2
SR - Security - Support Orchestration - Madrid 2019 Q2
SR - SIR - Security Incident Response - Madrid 2019 Q2
SR - SIR - Store SecOps Setup Assistant - Madrid 2019 Q2
SR - SIR - Store Threat Core - Madrid 2019 Q2
SR - SIR - Store Trusted Security Circles Client - New York 2019 Q3
SR - VR - Configuration Compliance - New York 2019 Q3
SR - VR - Vulnerability Response - New York 2019 Q3
SR - VR - Vulnerability Response PA Content - Madrid 2019 Q2

Intended Fix Version

Quebec

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:2020-09-01 10:54:17
Published:2020-09-01