Group approvals are all getting set to same value (Approved/Rejected) after last group approves/rejects
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2022 01:35 PM
I will preface by stating that this is apparently working as intended according to documentation, but I was hoping something could be done to keep it from happening. As noted in the documentation, this only happens when the "Condition based on script" option is used in the approval workflow activity. The other group approval options (An approval from each group, An approval from any group, etc) do not change the group approval values.
Let's say there's 3 groups:
- The user from the first group approves. The approval group switches from requested to approved.
- The user from the second group rejects. The approval group switches from requested to rejected.
- The user from the third group approves. The approval group switches from requested to approved.
After the final group has approved, the overall status is rejected, which I want so it goes down the correct route; however, the two groups that showed approved now change to rejected. This only occurs when using "Condition based on script." Other group approval types keep their approval status. Is there a way to keep the groups statuses from changing?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2022 02:19 PM
Hi,
The workaround mentioned in that support article, does that not work for you?
Please mark reply as Helpful/Correct, fi applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2022 02:30 PM
Hi
(function() {
var matchingId = current.parent;
grCI = new GlideRecord('sysapproval_group');
grCI.addQuery('parent', matchingId);
grCI.query();
if (grCI.next()) {
var parent = grCI.parent;
gs.info('testing:' + parent);
current.setWorkflow(false); //Do not run business rules
current.update;
}
})();