Notifications

28 views

Description

Using an approval script in a "Approval - Group" activity does not set the state to 3 (closed complete) or the active field to false on the Approval [sysapproval_group] record after approval.

Steps to Reproduce

  1. Open the workflow "Service Catalog Item Request"
  2. Replace the first "approval user" activity with an "Approval - Group" activity.
  3. Add a group "database".
  4. Under Condition for approval set Wait for to Condition based on a script
  5. Add the following script to Approval script field:
    var answer = '';
    //one approval to approve the activity
    for (var id in groups) {
    var group = groups[id];
    if (group.approved == 1){
    answer = 'approved';
    }
    }
  6. Submit a request for the Standard Laptop Catalog item
  7. When the RITM workflow reaches the group approval activity, approve one of the user approvals.

Notice on the [sysapproval_group] record, it's approved, however, the Active field is still true and State is still Open.

Expected behavior: The [sysapproval_group] record should have an Active field value of false, and State of Closed complete.

Workaround

Generate the group approvals using conditions instead of using a script.


Related Problem: PRB1294717

Seen In

There is no data to report.

Fixed In

Madrid

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2019-07-01 10:48:25
Published:2019-07-01