[Rt-devel] Extending the DB Schema

Joby Walker joby at u.washington.edu
Tue Oct 25 13:54:21 EDT 2005


I'm looking at adding a couple fields to the tickets table and I want to
make sure I understand how to properly link those fields in with RT and
DBIx::SearchBuilder.

First a little background: We have a requirement to display information
in a search that indicates if the requestor is the last person to
communicate (Create, Reply, Comment) on a ticket.  We identified
colorizing the subject as a great way to display this info, but we've
had issues getting good results.

First, we parsed throught each ticket's transactions to find the last
Create, Reply, or Comment and then colorize the subject based on that
person's relationship to the ticket.  But this slows the query down a lot.

Second, we compromised and just used the LastUpdatedBy field which is
fine for now (even though any transaction type determines this), but
when we start auto-increasing priority this data will not be useful.

So now, what I want to do is add two fields to the ticket table:
LastMessage(Date), LastMessageBy (principalID), which will be like
LastUpdated/LastUpdatedBy except only be modified by
Create/Reply/Comment transactions.

To have DBIx::SearchBuilder check a new field do I just need to add it
to the _CoreAccessible subroutine and create a _LocalAccessible
subroutine? Then All I'd need to do is add methods to get and set values
with _Value and _Set?
-- 

Joby Walker
ITI SSG, University of Washington


More information about the Rt-devel mailing list