I have noticed that when you select the 'on ticket save' option in the K1000 custom rules, that even if nothing was changed your rules will re-run. For instance I have a rule that generates an email to the owner whenever a ticket has been approved by a manager. Which is great, but everytime that someone looks at the ticket, if they click Save (Save and List, save and create child or just save) it will send this same email out.

How do i get it to only send the email out when that one field has been changed?

 

Any help would be greatly appreciated!

1 Comment   [ + ] Show Comment

Comments

  • In the select query specify the field in the where clause. I have used fields in the HD_TICKET_CHANGE for this purpose. Here's my simplified query to send an email when a ticket is assigned to a technician with only the relevant fields for preventing the query from sending emails every time you save:

    SELECT

    C.DESCRIPTION, -- $description

    FROM HD_TICKET
    /* latest change ***/
    JOIN HD_TICKET_CHANGE C ON C.HD_TICKET_ID = HD_TICKET.ID

    WHERE
    C.DESCRIPTION LIKE 'Changed ticket Owner%'

    /* this is necessary when using group by functions */
    GROUP BY HD_TICKET.ID
    HAVING 1=1

    Hope this helps. I had this same problem.
Please log in to comment

There are no answers at this time

Answers

Answer this question or Comment on this question for clarity