<p dir="ltr">I don't believe that you can achieve this with Ticket SQL, but there is another potential solution:</p>
<p dir="ltr">You mention that the users are in groups for the queues relevant to them.</p>
<p dir="ltr">If you configure RT so that the users can't see tickets in queues whose groups the users don't belong to, you would get the desired result without modifying the search.</p>
<p dir="ltr">Whether this is acceptable in your case depends on whether your users need to see tickets in queues outside their group memberships.</p>
<div class="gmail_quote">On 24/06/2014 2:57 am, "Milt Epstein" <<a href="mailto:mepstein@illinois.edu">mepstein@illinois.edu</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Greetings.<br>
<br>
I'm trying to customize the "10 newest uowned tickets" search (the one<br>
that appears on the main page by default, I believe).  I get to the<br>
page to edit the predefined "Search - Unowned Tickets" search, and it<br>
shows the logic for the search:<br>
<br>
Owner = 'Nobody'<br>
AND (<br>
  Status = 'new'<br>
  OR Status = 'open' )<br>
<br>
I want to exclude tickets in a certain queue, which by itself is<br>
pretty straightforward, just add:<br>
<br>
AND Queue != 'somequeue'<br>
<br>
But that's not quite what I want to do.  First, I should say that we<br>
have groups organized per queue, so that for instance we have a group<br>
'rt-somequeue' with access to the queue 'somequeue'.  What I really<br>
want to do in the logic above, is exclude that queue unless the user<br>
is in that corresponding group, something like:<br>
<br>
AND (<br>
  Queue != 'somequeue'<br>
  OR <User in group 'rt-somequeue'> )<br>
<br>
Is there a way to do this, either using the criteria listed on the<br>
Query Builder page (which seems to be all ticket-related), or by<br>
directly editing the search?<br>
<br>
Thanks.<br>
<br>
Milt Epstein<br>
Applications Developer<br>
Graduate School of Library and Information Science (GSLIS)<br>
University of Illinois at Urbana-Champaign (UIUC)<br>
<a href="mailto:mepstein@illinois.edu">mepstein@illinois.edu</a><br>
--<br>
RT Training - Boston, September 9-10<br>
<a href="http://bestpractical.com/training" target="_blank">http://bestpractical.com/training</a><br>
</blockquote></div>