Service Desk - Auto Populate CC List
I'm looking to create a custom ticket rule that would populate the CC List from a custom field that is pulling users. Possible?
0 Comments
[ + ] Show comments
Answers (1)
Answer Summary:
Please log in to answer
Posted by:
chucksteel
9 years ago
Top Answer
Yes, that should be possible. This update query should work:
update HD_TICKET
set HD_TICKET.CC_LIST =
(select USER.EMAIL from USER where USER.ID = HD_TICKET.CUSTOM_FIELD_VALUE0)
where
(HD_TICKET.ID in (<TICKET_IDS>))
This would set the CC_LIST value equal to the email address of the custom user specified in Custom Field 1 (CUSTOM_FIELD_VALUE0 in the table). Note that this will remove any entries already in the CC_LIST field and replace it.
Comments:
-
Thanks. Hmmm. It's not working for me. This is Custom Field 2 so I change it to pull from CUSTOM_FIELD_VALUE1. - jegolf 9 years ago
-
What does your select query look like? Is it matching tickets that need the CC_LIST set? - chucksteel 9 years ago
-
Bam - tweaked my select query. Set it as if that custom field is not null then run the update. Seems to be working. Thanks again... - jegolf 9 years ago
-
Actually - then if I remove the user from the custom field it does not clear the CC List which I would want to happen... - jegolf 9 years ago
-
You might need to have two rules, one that checks to see if the custom field is set and the other that checks to see if it isn't. - chucksteel 9 years ago
-
Yeah I'm having trouble figuring what value is set for an "Unassigned" user so I can target that. Just going to have to do some trial and erorr... - jegolf 9 years ago