Scripting Question

K1000: Running a rule against multiple queues?

02/24/2016 1102 views

So I've defined some rules on a specific queue, and I'd like to have those rules run on tickets in a second queue as well.  I could duplicate/recreate the tickets in the second queue's configuration, but ideally I'd have only a single set.  Makes it easier when changes need to be made.

From reading the K1000 documentation, this seems completely doable, but it's not working for me so far.  At the end of the Select SQL code, my where statement looks like this:

                   and HD_STATUS.ID = HD_STATUS_ID
                   and HD_IMPACT.ID = HD_IMPACT_ID
                   and HD_CATEGORY.ID = HD_CATEGORY_ID
                   and ((  HD_STATUS.NAME like '%Grading%') and (HD_TICKET.HD_QUEUE_ID = 15 or HD_TICKET.HD_QUEUE_ID = 12) )

This rule was originally developed for queue ID 15, and still works perfectly on that queue.  If a ticket has a status that includes the word "Grading" in the status, the rule actions take effect.

It will not, however, perform any actions on tickets in queue ID 12, either On Ticket Save or when the rule is run manually.

Anyone see anything obvious that I'm screwing up?
1 Comment   [ + ] Show comment


All Answers

I believe that when the rule is run KACE adds a line to the where clause which limits the rule to the queue where it is configured. There is an entry in the user voice forum to change this functionality:

Answered 02/25/2016 by: chucksteel
Red Belt

  • I definitely have rules that apply to all my queues. In that case, I don't have "HD_TICKET.HD_QUEUE_ID" in my WHERE clause at all.
    • I wouldn't necessarily want it running on ALL my queues, but that is an interesting angle. I will test.
      • If it's still an issue, post ALL of the rule information so we can take a look at it.

Try something like this, only grouping the ticket queue id checks:

                   and HD_STATUS.ID = HD_STATUS_ID
                   and HD_IMPACT.ID = HD_IMPACT_ID
                   and HD_CATEGORY.ID = HD_CATEGORY_ID
                   and HD_STATUS.NAME like '%Grading%'
                   and (HD_TICKET.HD_QUEUE_ID = 15 or HD_TICKET.HD_QUEUE_ID = 12)
Answered 02/25/2016 by: BHC-Austin
4th Degree Black Belt

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:


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