Group Approval getting skipped

Vengeful
Mega Sage

Hi Everyone,

 

We have a catalog item that requires 3 approvals.

The 1st (user manager) and 2nd (AOA POC) approvals are working, but the 3rd one (AOA Head) is being skipped.

Vengeful_0-1713414734194.png

 

Skipped error

Vengeful_1-1713414753174.png

 

Group approval setting

Vengeful_2-1713414800971.png

 

// Set the variable 'answer' to a comma-separated list of group ids or an array of group ids to add as approvers.

answer = [];

var country = current.location.country.toString();
var groupName;

if (country == 'Singapore') {
	groupName = gs.getProperty('glide.aoa.atsh_techmgr');
}
else if (country == 'China') {
	groupName = gs.getProperty('glide.aoa.atc_techmgr');
}
else if (country == 'Korea, Republic of') {
	groupName = gs.getProperty('glide.aoa.atk_techmgr');
}
else if (country == 'Malaysia') {
	groupName = gs.getProperty('glide.aoa.atm_techmgr');
}
else if (country == 'Taiwan') {
	groupName = gs.getProperty('glide.aoa.att_techmgr');
}
else if (country == 'United States') {
	groupName = gs.getProperty('glide.aoa.ati_techmgr');
}
else if (country == 'Japan') {
	groupName = gs.getProperty('glide.aoa.atj_techmgr');
}
else if (country == 'Portugal') {
	groupName = gs.getProperty('glide.aoa.atep_techmgr');
}
else if (country == 'Vietnam') {
	groupName = gs.getProperty('glide.aoa.atv_techmgr');
}
else {
	groupName = gs.getProperty('glide.aoa.amk_techmgr');
}


if (groupName != '') {
	var gr = new GlideRecord('sys_user_group');
	if (gr.get('name', groupName)) {
		answer.push(gr.sys_id);
	}
}

 

1 ACCEPTED SOLUTION

Vengeful
Mega Sage

I have my solution here.

The sys property of the groups I made are not working.

So I used the 'If' condition core instead.

View solution in original post

5 REPLIES 5

Vishwa Pandya19
Mega Sage

Hello,

 

Group Approvals generally get skipped because there are no active members in the group.
Please check if that is the case.

 

If my answer helped you in any way please mark it as correct or helpful.

Hi @Vishwa Pandya19 

All groups have active members.

Hello,

 

Try adding below logs.

1. Log to check if country is being fetched correctly in the variable.

2. Log to check if group name is being populated correctly in group name variable

3. Log to check in answer variable groupname value is being pushed or not

If my answer helps you in any way please mark it as correct or helpful.

Hi @Vishwa Pandya19 ,

I've been using that script to other catalog items. Only the difference is the sys property of the group.