/build/static/layout/Breadcrumb_cap_w.png

Adding Manager information to your KACE user table

First off, this depends on you using the LDAP function to bring all users into your KACE USER database.  This is done by adding 'manager' to the attributes to receive box.

Now you will notice that once the managers ARE imported from AD (Direct reports) that it comes in very ugly and sloppy, CN=PERSON,OU=SLOPPY,OU=UGH.

Now we need to trim that, and doing it by hand is not a doable task.
I have my LDAP set to run every day, just in case someone new gets added, but this also means that the manager field will update for anyone that doesn't have the correct manager.  This means, after the trim takes place, when the import runs the sloppy name will return, since LDAP thinks it's out of date.  This means the trim rule will have to run everytime your ldap runs.  I schedule the rule to run 5 minutes after the ldap, just to be safe.

Andddd here is the rule:

update `USER`
Set `CUSTOM_3` =
 IF(
        LOCATE('CN=', `CUSTOM_3`)  > 0,
        SUBSTRING(`CUSTOM_3`, 4, LOCATE(',', `CUSTOM_3`) - 4),
        `CUSTOM_3`
    ) 

This goes into the SELECT query area, and is enabled and scheduled.  No other checkboxes or actions needed.  You'll notice it goes to CUSTOM_3, this is CUSTOM_3 on the USER table as that is where I currently have MANAGER mapped to in the LDAP import.  This will need to be adjusted dependent on your own import mapping.

This should do the trick, you now have manager actual names in your user table for each user.  Why is this useful?  Well, with those names there, I can now reference them for ticket rules, such as "Send manager an email when ticket is idle."  By having that user name, you can reference that FULL_NAME table and get the manager email address, viola!

Hope this helps someone or leads them to bigger and greater ticket rules/notifications!


Comments

  • It didn't post the second half AFTER the code so here you go::::
    This goes into the SELECT query area, and is enabled and scheduled. No other checkboxes or actions needed. You'll notice it goes to CUSTOM_3, this is CUSTOM_3 on the USER table as that is where I currently have MANAGER mapped to in the LDAP import. This will need to be adjusted dependent on your own import mapping.

    This should do the trick, you now have manager actual names in your user table for each user. Why is this useful? Well, with those names there, I can now reference them for ticket rules, such as "Send manager an email when ticket is idle." By having that user name, you can reference that FULL_NAME table and get the manager email address, viola!

    Hope this helps someone or leads them to bigger and greater ticket rules/notifications! - Wildwolfay 9 years ago
  • Wolf can u share ur Select SQL and update statement pls - rahimpal 7 years ago
This post is locked
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ