Run ticket rule once per ticket
I have several simple ticket rules that were created with the wizard to populate certain fields. All of these rules work correctly, however I would like for them to only run once opun ticket creation. Some of these field may need to be changed later, and I don't want the ticket rules changing them back during a scheduled run or on ticket save. Is there a way to make a ticket rule only run once per ticket. It would be nice to have an option for a rule to run "On Ticket Creation"
Please explain in dumb terms because I am not very experienced with SQL
Answers (2)
I found the solution in another thread similar to this one. You can add this to the scripting to check whether the ticket is being created. Set this to run "On Ticket Save" and it will only be able to run on ticket creation.
------------------------------------------------------------------------------------------------------
If you only want a rule to be effective the moment a ticket is created then you add in a join to HD_TICKET_CHANGE and look for "Ticket Created" like this:
.
.
.
from (HD_TICKET, HD_PRIORITY, HD_STATUS, HD_IMPACT, HD_CATEGORY)
JOIN HD_TICKET_CHANGE C ON C.HD_TICKET_ID=HD_TICKET.ID and C.ID=<CHANGE_ID> and C.DESCRIPTION LIKE 'Ticket Created%'
.
.
.
------------------------------------------------------------------------------------------------------
Comments:
-
There is an old KACE FAQ on doing this but it has given me nothing but trouble, and whenever I update a ticket it still reads the TICKET CREATED and updates the ticket. - Wildwolfay 11 years ago