/build/static/layout/Breadcrumb_cap_w.png

How would we limit a K1000 helpdesk ticket email rule to a single queue?

We use a ticket rule to send hourly emails listing all new helpdesk tickets. This week we added a second queue to our K1000 for another department, however the ticket rule is now being triggered by tickets in both queues. We've tried adding 'AND HD_TICKET.HD_QUEUE_ID = 1' but it caused an error. Any suggestions would be warmly welcomed :)

CURRENT RULE:

SELECT
T.ID AS TICKNUM,
T.TITLE AS TITLE,
S.NAME AS STATUS,
U.EMAIL AS SUBMITTER_EMAIL,
U.FULL_NAME AS SUBMITTER_FULLNAME,
CONCAT ('http://kbox1.OurCompany.org/adminui/ticket.php?ID=' , T.ID) AS TICKET_LINK

FROM HD_TICKET T JOIN HD_STATUS S ON (T.HD_STATUS_ID = S.ID) JOIN USER U ON (T.SUBMITTER_ID = U.ID) WHERE HOUR(NOW()) > 6 AND HOUR(NOW()) < 19 AND NOW() > DATE_ADD(T.CREATED, INTERVAL 15 MINUTE) AND S.NAME = 'New'

/******* begin only during business hours ***********/
     /**/and HOUR(NOW())>=7  /* 7am or later kbox time*/
     /**/and CURTIME()<='18:00:00'  /* before 6pm Pacific */
     /**/and DAYNAME(NOW()) NOT IN ('Saturday','Sunday')  /* not the weekend */
     /**/and DAYOFYEAR(NOW()) NOT IN (1,360)   /* not xmas or new year's */
     /**/and NOT(   /*not U.S. thxgiving 2 days */
     /**/   MONTHNAME(CURDATE())='November' and (
     /**/      (DAYNAME(CURDATE())='Thursday' and DAYOFMONTH(CURDATE()) IN (22,23,24,25,26,27,28)) OR
     /**/     (DAYNAME(CURDATE())='Friday' and DAYOFMONTH(CURDATE()) IN (23,24,25,26,27,28,29))
     /**/)  )  and NOT(      /* not U.S. Labor Day */
     /**/   MONTHNAME(CURDATE())='September' and DAYNAME(CURDATE())='Monday' and DAYOFMONTH(CURDATE()) IN (1,2,3,4,5,6,7) )
     /******* end only during business hours ***********/


2 Comments   [ + ] Show comments
  • Have you tried using 'AND T.HD_QUEUE_ID = 1' since you aliased HD_TICKET as T? - grayematter 10 years ago
  • Worked like a charm. Thank you so much for the assist! - jvincent 10 years ago

Answers (1)

Answer Summary:
Posted by: jvincent 10 years ago
Orange Belt
1

Grayematter's comment above answered this question. Thank you!

Have you tried using 'AND T.HD_QUEUE_ID = 1' since you aliased  HD_TICKET as T? - See more at: http://www.itninja.com/question/how-would-we-limit-a-k1000-helpdesk-ticket-email-rule-to-a-single-queue#sthash.p4B77XXH.dpuf

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