[SOLVED] K1000 Service Desk Auto-Populate (and e-mail) CC_List
So I have been working to try to duplicate the idea found in this thread: http://www.itninja.com/question/auto-populate-cc-list
I have configured it so that the ticket submitter's manager is autopopulated into the CC_List on the ticket save, however it seems to be doing so at the very end of the entire process, so on the ticket creation, the manager is not being e-mailed. I have checked the CC_List e-mail settings and have it set to notify the CC_List on any change, but still no dice on the ticket creation. I have no experience whatsoever with SQL and the custom ticket rules all look like heiroglyphics to me, so my troubleshooting in this endeavor is extremely limited. Does anyone know if there is an easy fix to make the ticket rule that populates the CC_List on ticket save also ensure that an e-mail is sent on ticket save? I was thinking if I could come up with that, then I could just clear the e-mail boxes for CC_List and the problem would be solved?
Okay, so this cannot possibly be the most efficient method but it was the only way I could get everything to work exactly how I wanted it. To accomplish this, I created 3 custom ticket rules. We do not have manager e-mail addresses stored in our AD but we do have the user's manager's distinguished name, so during user import I imported the user's distinguished name into user custom field 1 and their manager's distinguished name into custom field 2. For my first ticket rule I ran a query to find a match of custom field 2 for the user to another user's custom field 1. It then grabbed the e-mail field of the matching row and placed that in the tickets custom field 1. This rule was modeled after terabyte's rule in his original quesiton here: http://www.itninja.com/question/auto-populate-cc-list The second rule places custom field 1 of the ticket into the ticket CC field for future ticket updates through the CC checkbox options in the ticket settings. It followed the logic of GillySpy's rule on the same article from above, making sure that the e-mail is not already in the CC list and if there is another e-mail address in the CC list then the manager e-mail should be added in addition to the existing CC list. However since this was happening on ticket save it wasn't sending out the initial email on ticket creation. Thus I wrote a 3rd ticket rule. The third rule sends a customized e-mail and is an exact duplicate of the rule found in this article: http://www.kace.com/support/resources/kb/article/How-To-Notify-Any-User-or-Group-by-Email-When-a-New-Help-Desk?action=artikel&cat=8&id=613&artlang=en except that instead of hardcoding an e-mail address on the line 'email@example.com' AS NEWTICKETEMAIL I used HD_TICKET.CUSTOM_FIELD_VALUE1 AS NEWTICKETEMAIL. The reason for doing the initial e-mail using the custom field value was because if I were to use the CC_FIELD some people could end up getting e-mailed twice, once for the default CC_FIELD behavior and then again because of the custom ticket rule. This way people that the user specified in the CC_FIELD receive the normal e-mail and the email for the supervisor gets sent out by the rule. On future changes they all get the same e-mail. Sorry if this is incredibly ridiculous sounding, I just had very specific instructions and not much to work with so I just combined a bunch of different elements. If you want to see the actual custom rules I will post them below in the comments. Thanks, Andrew