Manager approvals when a manager doesn't exist

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2014 01:32 PM
Hi everyone,
We have a few catalog items in our Service Catalog that require an approval from a manager before the workflow can proceed. On many of these items, we use the user table to look up the requestor's manager (we sync with Active Directory to get user data in) so the approval can automatically go to that manager. Normally this works just fine, but we run into problems when a requestor doesn't have a manager listed. In that case, the approval task gets "sent" to UNKNOWN (the value of the manager field in the requestor's user profile) and therefore can't be approved. Furthermore, it doesn't look like the approval task can be reassigned to someone else once it's created.
Does anyone know of a quick way to redirect these approvals from UNKNOWN to an actual person? Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2014 02:51 AM
Hi,
You could put an if condition before the approval, checking if the user has a manager - if it is blank you could route it down a different (generic approver) and if the manager is populated you could route it down the normal workflow.
Thanks,
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2014 03:08 AM
Now if there are already approval records which are pending with UNKNOWN, just go th the list view of the approval table(sysapproval_approver) and then add the approval for column to the list view, and change the approver manually to desired user (as admin user)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2017 07:59 AM
I agree 100% with chandan_padhy - it's critical to understand the best process first.
Unfortunately, we're in the middle of an acquisition. We now have two "people" systems but the provisioning processes haven't been nailed down yet and we're getting hammered by issues related to missing approvers.
So, in the meantime, I have a gauge on my Home Page that lists approvals that were sent to Locked Out or Unknown people. I like sryan 's strategy for sharing the fun of sorting this out with the Service Desk. I also like raising awareness of the need to update reporting structure in our legacy "people" system by having notifications fired whenever we encounter a missing approver.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2014 10:59 AM
You'll need to use the advanced feature of approvals and script who you want to approve. Below is pseudo code. You'll want to query the requested for's user record and check to see if the manager is set to the "UNKNOWN" user record or if it is null. If it's null pick your alternative approval person.
answer = [];
//Get the users manager
var gr = new GlideRecord("sys_user");
gr.addQuery("sys_id", current.somevariablename); //query with the sys id of the requested for
gr.query();
while (gr.next()) {
//grab the managers value
if (gr.manager.name == 'UNKNOWN') {
// insert logic to assign the approval to someone else
answer.push(sysidofthebackupuser);
} else {
//assign the person manager to do the approval
answer.push(gr.manager);
}
}