[rt-users] Query to find open tkts where customer hasn't been replied to

Gary Oberbrunner garyo at genarts.com
Wed Aug 8 16:50:22 EDT 2007


I'd like to make a query to find all open tickets where the customer's been
waiting for a reply for longer than N hours.  It looks to me like Told is the
last time the customer was replied to, and LastUpdated is the last time
anything happened in the ticket.  So I tried this, in the Edit Query view:

  Queue = 'support' AND Status = 'open' AND Told + 1 < LastUpdated

but when I apply the changes, RT says "Error near ->LastUpdated<- expecting a
VALUE in ' Queue = 'support' AND Status = 'open' AND Told > LastUpdated'
 I'm lost"

which is cute, but doesn't help me make my query.  How can I do this?  It's
pretty straightforward SQL, but I'm not sure how to make a straight SQL query
from the interface.  Is there a mode where I can mark a query as "just submit
it to the database as a WHERE clause, don't try to interpret it"?

Or is there a better way to do what I'm looking for?

thx,

-- 
Gary



More information about the rt-users mailing list