[rt-users] Query builder logic

ruz at bestpractical.com ruz at bestpractical.com
Mon Jun 9 11:13:55 EDT 2008


__CurrentUser__ is correct way, but it works in 3.6.x only (don't
recall exact version) and only in saved searches. The latter is a sort
of incident and have been fixed few days ago. In 3.6.7 you'll be able
to use '__CurrentUser__' all over the places. Patch is very simple,
you can grab it from our repository.

Note that '__CurrentUser__' is id of the user and query you want will
look something like:

Watcher.id = '__CurrentUser__'

In 3.6.6 this query should work if you'll save it as saved search.

On 6/9/08, Tom Smith <aliase573201 at mac.com> wrote:
> Hi,
>
> I'm trying to build a custom query with Query Builder that can be
> used in the global "RT at a glance" configuration. I understand how
> to create the custom query but am having trouble identifying the
> correct variables to use to identify the currently logged in user.
>
> I used "[_1] highest priority tickets I own" as a model. I want to
> create a single query that will show all tickets for a person if
> their email address appears as Owner, Requestor, CC, or AdminCC.
>
> If I create a custom query using the exact syntax of the of the
> default query above, no tickets come up. If I replace
> '__CurrentUser__' with my email address, it locates the tickets I own.
>
> Can anyone offer any advice or direction to documentation explaining
> how to do this?
>
> ~ Tom
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
>


-- 
Best regards, Ruslan.



More information about the rt-users mailing list