Re: excluding queue in RT SQL

Matt Zagrabelny <[email protected]> Thu, 9 Feb 2017 09:47:59 -0600
Newsgroups gmane.comp.bug-tracking.request-tracker.user
Message-ID <CAOLfK3Xc4O0uj7kbj4VsK4Kx4qGaisv0mB+TupPcqbRiGc8UVg@mail.gmail.com>
Hey Alex,

On Thu, Feb 9, 2017 at 9:02 AM, Alex Hall <[email protected]> wrote:
> Hi all,
> Just a quick question, and one I feel like I should know. In RT's
> implementation of SQL, how do I specify a queue; name or ID?

Just a point of clarification: RT has something called TicketSQL and
while "SQL" is in its name, it is not SQL.

That being said, you want the queue's name.

> We have a cron job that runs, using SQL to search for tickets. I'm being
> asked to exclude a specific queue from this search. Do I need to use "queue
> <> 'queue name'" or "queue <> 7"? Thanks.

I would build some of the query with the search builder:

Search -> Tickets -> New Search

Add a few predicates to your search and then click Advanced. You'll
see exactly what TicketSQL RT uses.

-m