32 views

Description

If group approvals for a record are in a Not Requested state and one of those group approvals is cancelled, the remaining group approvals are set to No Longer Required on when the Request Approval UI action is clicked.

Steps to Reproduce

 

  1. Import the attached workflow version.

  2. Create a new change request of type Normal.

    The change request now has a few group approvals created in the Not Requested state.

  3. In list view, change the state of one of those group approvals to Cancelled.

  4. Click the Request Approval UI action.

    Note that instead of the remaining group approvals being set to the Requested state, all of the remaining approvals are set to No Longer Required.

 

 

Workaround

Modify the onExecute function in the Approval-Group activity definition script.

Replace the following lines:

if (approvals.length > 0) {
// In order to maintain the approval state if we revisit this approval activity
// we need to only request those approvals that are currently in a Not Requested state
 
var state = this.approvalUtils.getGroupApprovalStateById(approvals);
if(state && state != 'not requested') {

with:

if (approvals.length > 0) {

// In order to maintain the approval state if we revisit this approval activity
// we need to request only those approvals that are currently in a Not Requested state

var state = this._determineOverallState();
if(state && state != 'skipped') {

 

 


Related Problem: PRB1264753

Seen In

There is no data to report.

Intended Fix Version

London

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-04-05 18:31:22
Published:2018-04-05