There is a client script :  Auto Fill Assigned To field

 

Which is with OnChange of : Assignment group field:

 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
ScriptLoader.getScripts('sn_hr_core.utils_ui.jsdbx', function(){
getGlideRecord('sys_user_group',newValue , setAssignTo);
});

function setAssignTo(group){
if (group)
g_form.setValue('assigned_to', group.manager);
}

}

 

I see this is the one which is doing this. If we have such Client script do manager gets assigned even if he is not active ??

 

 

Hello @radt 

I see that the script loader mentioned here - sn_hr_core.utils_ui.jsdbx is not exposed to customers or admins.

Am assuming this needs to be fixed in the script loader.

I would recommend creating a case with support, and getting more clarity as to if there is any condition added in the script to check for inactive users set as managers for groups.

 

I however have a question for you:

If an user is inactive in the system, shouldn't all dependencies be removed where this user id is used?

Are more importantly in situations like this, where the user is an assignment group manager, or in other cases, the user could be a supervisor or manager to anothe user.

You mean to say we remove them manually from all the supervisor roles once they are Inactive? can we have a table or somewhere to check where this user is a manager or supervisor for what all groups or users?

Hello @radt 

You dont need to do it manually.

You can automate this using a business rule or a scheduled job.

  1. You can navigate to the sys_user table, and add the column Manager. This will show you all the user who have the manager set as the inactive user.
  2. You can navigate to the sys_user_group table, and add the column Manager. This will show you all the groups that have the manager set as the inactive user.

View solution in original post

Thank you 🙂 That is really helpful.. 

 

I pulled the manager column and Active filed works on Users Right. How do I know which manager is Inactive there? I see the managers in the list view of users but where is their active seen?