Why is my Custom Ticket Rule not creating a new ticket
I have a custum ticket rule in one queue (Laptop Request) that when a status of Approved is set and the ticket saved, the system is supposed to send an email to another queue (Laptop Setup)to create a new ticket. This is not a true parent-child situation since they do not need to be tied together.
The problem is that the email does not seem to go through or the ticket is not created. I know the rule is collecting the necessary information, because I have it set to also send the query results to my email. I will put the info below as well as the custom rule, taking company info out of it. I also know that the Laptop Request queue can send email because it sends status updates from other custom rules to my email
I am able to email the Laptop Setup queue from my email and create a ticket so I know it is accepting email. I have also created a user in KACE for the Laptop Request queue and assigned its email address to that user account. That user is then added as an approved submitter and owner of the Laptop Setup queue. I have run the query through MySQL Workbench and recieved the appropriate information as well.
Thank you in advance for any help I can get with this.
/* Laptop Request - Approval Child Ticket Creation SELECT Query
/* This SELECT Query takes category and user information and
/* assigns to variables that can be injected into an email to create
/* a new ticket.
/* Tables Called:
/* HD_TICKET, HD_TICKET_CHANGE, HD_STATUS, HD_QUEUE
/* HD_CATEGORY, USER
/* id - Used in email subject and body to denote parent ticket number
/* childtitle - Used in subject line to give title to child ticket
/* mm - used to push model request to setup ticket
/* staff - staff username
/* Update Log:
/* Created 12-26-12 by RL*/
/*Parent Ticket Number*/
HD_TICKET.ID AS ID, -- $ID
/*Assigned Machine Model*/
HD_TICKET.CUSTOM_FIELD_VALUE6 as MM, -- $MM
/*Assigned to Staff Member*/
HD_TICKET.CUSTOM_FIELD_VALUE7 as STAFF, -- $STAFF
/*Child Ticket Email*/
'queue email address goes here' AS NEWTICKETEMAIL, -- $newticketemail
/*Child Ticket Title, Requried*/
'Set up staff machine' AS CHILDTITLE, -- $Childtitle
/*Child Ticket Submitter*/
OWNER.USER_NAME AS SUBMITTER -- $Submitter
/* Queue ID********/ JOIN HD_QUEUE Q ON Q.ID=HD_TICKET.HD_QUEUE_ID
/* Ticket Change***/ JOIN HD_TICKET_CHANGE C ON C.HD_TICKET_ID=HD_TICKET.ID and C.ID=<CHANGE_ID>
/* Ticket Status***/ JOIN HD_STATUS S ON S.ID=HD_TICKET.HD_STATUS_ID
/* Ticket Owner ***/ LEFT JOIN USER OWNER ON OWNER.ID = HD_TICKET.OWNER_ID
/* Verifies ticket just approved***/ C.DESCRIPTION LIKE 'Changed ticket Status from%'
/* Verifies ticket queue***********/ and HD_TICKET.HD_QUEUE_ID = '13'
/* Verifires request is approved***/ and S.NAME='Approved'
Send an email for each result row:
- Email Column:
- Email Body:
Query Results emailed to me:
|1||5750||HP 2730||*Removed*||Set up staff machine||*Removed*|