/build/static/layout/Breadcrumb_cap_w.png

K1000 Service Desk: SLA Timer Help!

I have followed the tutorial so far to create a SLA timer in the Service Desk (http://www.itninja.com/blog/view/creating-true-sla-timers-in-the-kbox-helpdesk-part-1-what-you-really-want-from-your-data) so I can get more accurate account of time a ticket is in an opened or stalled state. I left a comment on Part III along with another user that there is an error when we run the SQL on the first ticket rule "Adjust custom modified field".

I also want to use it to set Business Hours so the timer only counts business hours as time opened. The SQL on these rules is far beyond me.

Here's the sql select query for the "Adjust custom modified field" rule:

update 

        HD_TICKET as T 

   JOIN HD_TICKET_CHANGE C ON C.HD_TICKET_ID=T.ID and C.ID=<TICKET_IDS>

set 

   T.CUSTOM_FIELD_VALUE11 = NOW(),

   T.CUSTOM_FIELD_VALUE12 = 

             IF(C.DESCRIPTION LIKE 'Ticket Created%' OR T.CUSTOM_FIELD_VALUE12='',

                 0,T.CUSTOM_FIELD_VALUE12) ,

   T.CUSTOM_FIELD_VALUE13 = 

             IF(C.DESCRIPTION LIKE 'Ticket Created%' OR T.CUSTOM_FIELD_VALUE13='',

                 0,T.CUSTOM_FIELD_VALUE13) ,

   T.CUSTOM_FIELD_VALUE14 = 

             IF(C.DESCRIPTION LIKE 'Ticket Created%' OR T.CUSTOM_FIELD_VALUE14='',

                 NOW(),T.CUSTOM_FIELD_VALUE14)

And here's the update query:

update 

        HD_TICKET as T 

   JOIN HD_TICKET_CHANGE C ON C.HD_TICKET_ID=T.ID and C.ID=<TICKET_IDS>

set 

   T.CUSTOM_FIELD_VALUE11 = NOW(),

   T.CUSTOM_FIELD_VALUE12 = 

             IF(C.DESCRIPTION LIKE 'Ticket Created%' OR T.CUSTOM_FIELD_VALUE12='',

                 0,T.CUSTOM_FIELD_VALUE12) ,

   T.CUSTOM_FIELD_VALUE13 = 

             IF(C.DESCRIPTION LIKE 'Ticket Created%' OR T.CUSTOM_FIELD_VALUE13='',

                 0,T.CUSTOM_FIELD_VALUE13) ,

   T.CUSTOM_FIELD_VALUE14 = 

             IF(C.DESCRIPTION LIKE 'Ticket Created%' OR T.CUSTOM_FIELD_VALUE14='',

                 NOW(),T.CUSTOM_FIELD_VALUE14)


0 Comments   [ + ] Show comments

Answers (0)

Be the first to answer this question

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