QueryBuilder: find where LastUpdatedBy 'unprivileged'

We would like to make a Saved Search that will show us all tickets
where LastUpdatedBy was a client as opposed to one of our support
staff.

What would the correct TicketSQL be to get something like:

(Status = ‘open’ OR Status = ‘new’ ) AND ( Owner = ‘CurrentUser’ ) AND
(
LastUpdatedBy IS AN UNPRIVILEGED USER
OR
LastUpdatedBy.User.Email Not like ‘@ourdomain.com
)

Is such a query possible in TicketSQL?

I searched the web and could only find an announcement of release
3.6.7 where one of the change notes was:

"* add id to the list of users' properties you can search by [ruz]"

but I don’t know how one actually searches on a user’s property in the
QueryBuilder.

It’s not exactly the same, but what about where Last Updated > Told?

Cambridge Energy Alliance: Save money. Save the planet.

Hi Alllen,

Try LastUpdatedBy.EmailAddress not like ‘@…’. I think it works in
the latest RT.

But there is no LastUpdatedBy IS AN UNPRIVILEGED USER thing.On Wed, Aug 12, 2009 at 4:02 AM, Allenallen+rtlist@crystalfontz.com wrote:

We would like to make a Saved Search that will show us all tickets
where LastUpdatedBy was a client as opposed to one of our support
staff.

What would the correct TicketSQL be to get something like:

(Status = ‘open’ OR Status = ‘new’ ) AND ( Owner = ‘CurrentUser’ ) AND
(
LastUpdatedBy IS AN UNPRIVILEGED USER
OR
LastUpdatedBy.User.Email Not like ‘@ourdomain.com
)

Is such a query possible in TicketSQL?

I searched the web and could only find an announcement of release
3.6.7 where one of the change notes was:

“* add id to the list of users’ properties you can search by [ruz]”

but I don’t know how one actually searches on a user’s property in the
QueryBuilder.


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@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.

Allen;

Can I also suggest a working practice we adopt and maybe relevant to
your question, when we are waiting on a customer response we set a
ticket status to stalled , and we have a global scrip to set a ticket
status to open on correspondence.
So when we look for tickets where the last correspondence was from a
customer we simply look for
(Status = ‘open’) AND ( Owner = ‘CurrentUser’ ) ; again a process
we have is if a ticket is owned its no longer ‘new’,

Apologies if its not relevant.

Regards;

Roy

Ruslan Zakirov wrote:

(from Jerrad)
It’s not exactly the same, but what about where Last Updated > Told?

This looks like it would have done what I want, but “Advanced” screen
of QueryBuilder won’t accept it. Upon “Apply,” I get the error:

"Wrong query, expecting a VALUE in 'LastUpdated > >Told<--here'"

(from Ruslan)
Try LastUpdatedBy.EmailAddress not like ‘@…’.

In version 3.8.4, QueryBuilder accepts this input, but it has no
effect on the search results. The search seems to execute but ignore
this clause. It does throw an error in the log for “sub _EnumLimit”:

[error]: Invalid Operation: LIKE for LastUpdatedBy at

/usr/share/request-tracker3.8/lib/RT/Tickets_Overlay.pm line 339.

(from Raed)
when we are waiting on a customer response we set a ticket status to stalled

Thanks for this, but I think we want to reserve the stalled status for
more atypical conditions that delay a ticket as opposed to normal
delay between correspondence. I see how you do use it though to find
the items where the ball is or is not in your court.

Any other ideas on how to employ the EmailAddress of the LastUpdatedBy
person, or how to compare LastUpdated to Told (QueryBuilder seems to
want a literal value for the comparison)?

Allen