/build/static/layout/Breadcrumb_cap_w.png

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.

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

Answers (2)

Posted by: jdornan 11 years ago
Red Belt
0

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

Posted by: chucksteel 11 years ago
Red Belt
0

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


Comments:
  • 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 - sdnbtech1 11 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
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