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.

Select Query:

 /*  Name:
/*  Laptop Request - Approval Child Ticket Creation SELECT Query
/*
/*  Purpose:
/*  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
/* 
/*  Variables:
/*  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*/


SELECT
    /*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
 
FROM HD_TICKET
 /* 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
 
WHERE
 /* 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:

  • Subject:
    $id $childtitle 
  • Email Column:
     $newticketemail
  • Email Body:
    @SUBMITTER=$SUBMITTER
    @PARENT_TICKET=$ID
    @CUSTOM_FIELD_VALUE8=$STAFF
    @CUSTOM_FIELD_VALUE9=$MM

Query Results emailed to me:

 
# Id Mm Staff Childtitle Submitter
1 5750 HP 2730 *Removed* Set up staff machine *Removed*
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

0

Click show results of select and post the error you are getting

Answered 01/14/2013 by: jdornan
Red Belt

Please log in to comment
0

If you have the rule send the email to you instead of the queue, do you receive it?

Answered 01/04/2013 by: chucksteel
Red Belt

  • I'm getting this in the run log:

    01/06/2013 15:34:47> Starting: 01/06/2013 15:34:47
    01/06/2013 15:34:47> Executing Select Query...
    01/06/2013 15:34:47> selected 1 rows
    01/06/2013 15:34:47> Sending ticket notifications...
    01/06/2013 15:34:47> sent mail to 0 of 1
    01/06/2013 15:34:47> Ending: 01/06/2013 15:34:47
Please log in to comment
Answer this question or Comment on this question for clarity