[rt-users] TicketSQL question

Roy El-Hames rfh at pipex.net
Wed Oct 19 13:31:56 EDT 2005

You have one more option,  create new status similar to stalled , then 
(using scrips) every time the requestor send a correspondence the ticket 
is set to status (CustUpdate) or whatever, any other action or 
correspondence from anywhere else reset the status to open (obvoiusly 
with the exception of status change) ....
Then search for Tickets with status = CustUpdate and LastUpdated > 3 
days  ..


Bob Goldstein wrote:

>>>   I basically want to know, did the requestor
>>>   send that last Correspond?  If he did,
>>>   and did it 3 days ago, I need to crack some
>>>   heads.  But if we sent the last correspond,
>>>   the heads can stay healthy.
>>I don't believe that is possible in raw TicketSQL.
>>It wouldn't be hard to add a "LastTransaction" concept to TicketSQL,
>>but then you have to ask the question: "Do we generalize this?  What
>>if I want the 2nd to last transaction?"  "What if I want the last
>>Comment?"  And suddenly the world explodes.
> Boom! I think you're right, but still, what SHOULD
> TicketSQL do?  How much should it be like SQL?
>     ...(select max(Transaction.date) where Transaction.type='correspond') ...
>  The 'S' in SQL basically means subqueries, but not in TicketSQL.
>  I agree that "last Comment" is fair game, but the "2nd to last"
>  is a lot harder and less useful, so I'm less concerned there.
>  Let me generalize my question/quandry.  I need some reports.
>  My options are:
>     1. TicketSQL
>     2. Real SQL
>     3. Perl with Objects and DBIx::SB
>  TicketSQL doesn't have the features, although the fact it works
>  in a url is very attractive. Real SQL would be great if the
>  schema docs were ok (am I missing them?) and I could count on
>  the schema not changing, but the book kinda recommends against
>  raw sql (I'm talking read-only though). Perl would work, of
>  course, but that seems so laborious and ad hoc compared to sql
>  (much as I like perl).
>  What would you do?
>     bobg
>Be sure to check out the RT Wiki at http://wiki.bestpractical.com
>Buy your copy of our new book, RT Essentials, today! 
>Download a free sample chapter from http://rtbook.bestpractical.com

More information about the rt-users mailing list