I would like to put a group name into a custom field, and then see only the tickets in a certain queue where that group is a group that I belong to.  I know how to do this from pgsql:<div><br><div><div>select t.*</div><div>
from tickets t</div><div>join queues q on t.queue = <a href="http://q.id">q.id</a></div><div>join objectcustomfieldvalues ocfv on objecttype = 'RT::Ticket' and objectid = <a href="http://t.id">t.id</a></div><div>join customfields on <a href="http://customfields.id">customfields.id</a> = ocfv.customfield</div>
<div>join groups on <a href="http://groups.name">groups.name</a> = ocfv.content</div><div>join groupmembers on groupmembers.groupid = <a href="http://groups.id">groups.id</a></div><div>where <a href="http://q.name">q.name</a> = 'rtqueue1' and</div>
<div><a href="http://customfields.name">customfields.name</a> = 'group_assigned' and</div><div>groupmembers.memberid = 24 and</div><div>t.disabled = 0 and q.disabled = 0 and ocfv.disabled = 0;</div></div><div><br>
</div><div><div><br></div><div>but is it possible to do this sort of thing in a custom query?<br clear="all"><div><br></div>-- <br><a href="http://www.linkedin.com/in/paultomblin">http://www.linkedin.com/in/paultomblin</a><br>
<a href="http://careers.stackoverflow.com/ptomblin">http://careers.stackoverflow.com/ptomblin</a><br><br>
</div></div></div>