Hopefully this is an easy thing -- Basically, we've just created a second queue (various departments/levels), and I'm figuring out what is/isn't working in terms of ticket rules/scripts. I have a rule that, when a ticket is unassigned for over an hour, there is an email sent out to us in IT. Now, with the second queue, I copied the rule over because I want it working for both queues. All I changed was the email subject, basically letting me know if it was from queue1 or 2.

 

Probelm I had was that, in testing with one unassigned ticket in queue 1, I got both emails (ie, the same information, but the subject title was queue1 and queue2). I was curious if anyone knew what I had to change for this to send only a email if it's in the specific queue, not an overall thing. I assume is something simple, but this is my first change with double quques.

 

Code is below, thank you in advance!

 

SELECT
      HD_TICKET.ID AS TICKNUM, -- $ticknum
      HD_TICKET.TITLE, -- $title
      DATE_FORMAT(HD_TICKET.CREATED,'%b %d %Y %I:%i:%s %p') AS CREATED, -- $created
      -- SUBMITTER.USER_NAME AS SUBMITTER_UNAME, -- $submitter_uname
      SUBMITTER.FULL_NAME AS SUBMITTER_FNAME, -- $submitter_fname
      -- SUBMITTER.EMAIL AS SUBMITTER_EMAIL,     -- $submitter_email
      S.NAME AS STATUS,   -- $status
      P.NAME AS PRIORITY, -- $priority
      CAT.NAME AS CATEGORY, -- $category
      '(company email redacted)' AS NEWTICKETEMAIL -- $newticketemail
 
      FROM HD_TICKET
      /*status**********/ JOIN HD_STATUS S ON S.ID=HD_STATUS_ID
      /* priority ******/ JOIN HD_PRIORITY P ON P.ID=HD_PRIORITY_ID
      /* category ******/ JOIN HD_CATEGORY CAT ON CAT.ID=HD_CATEGORY_ID                                                   
      /* submitter *****/ LEFT JOIN USER SUBMITTER ON SUBMITTER.ID = HD_TICKET.SUBMITTER_ID
                                                                              
     WHERE TIMESTAMPDIFF(MINUTE,HD_TICKET.CREATED, NOW()) > 60 and S.NAME ='new' AND HOUR(NOW()) > 7 AND HOUR(NOW()) < 18
      ORDER BY TICKNUM

0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

0

Anyone have any ideas on this?

Answered 10/31/2012 by: Mark_B
Orange Senior Belt

Please log in to comment
0

Normally rules have a HD_QUEUE_ID = (queue id) in them that limits them to the specific queue. I'm surprised that your rule posted above doesn't include it.

 

Answered 11/01/2012 by: chucksteel
Red Belt

  • Hi, I realize this is waaaay old, but this project got sidelined. Where would that HD_Queue_ID= generally go? As it stands now, if this rule is in queue 1, it runs for all 3 queues. If we put it in a second queue and enable it, we get 2 messages (i change the title for each so I see they show at the same time)
Please log in to comment
Answer this question or Comment on this question for clarity
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja

Share