[rt-users] Customization Advice

Bruce Campbell bruce_campbell at ripe.net
Sat Apr 6 02:12:08 EST 2002


On Fri, 22 Mar 2002, Smylers wrote:

( sheesh, has it been that long since I've been in the office? )

> On Mar 7 Bruce Campbell wrote:
>
> > On Wed, 6 Mar 2002, Smylers wrote:
> >
> > >   * I've found the table in the database where scrip actions are listed.
> > >     Presumably to add in new ones I just add a row here with the obvious
> > >     fields?
> >
> > Most of the contributed ScripConditions/ScripActions are supplied with an
> > 'insert' script, where running it will perform the background SQL magic
> > for you.  It is easier (and safer) for you to copy one of these and change
> > as appropriate, than to be messing about with SQL INSERT statements.
>
> I'd had a look at these but found them very scary.  For example,
> AutoAssign.pm.insertdata appears to run in package RT (as used by
> RT.pm), then looks to be creating users and groups (that I'd expect
> already to exist), then creates ScripActions (but all of them, the
> existing ones plus the new ones), and the same for ScripConditions.  Is
> that right?

Not really.  Most of the insert scripts don't create extra rt users or
groups, and simply ask for the next id-number in the
Scrip{Action,Condition} table to be assigned.  It doesn't re-create
existing Scrip components.

> To add a new ScripAction does my .insertdata script have to have a list
> of all the existing ScripActions?

Nope.

> I've seen that the 'RT Hackers Guide'
> has appeared since my original question.  I'll read through that before
> trying anything.

I really need to work on that some more.  My home machine has a copy of
all publically contributed addons (web site, mailing lists or references)
and it will probably take me another month to review/test most of the
contrib stuff, and sift through the mailing lists for gems of wisdom
(which is what I intend the RT Hackers Guide to be).

> > >     ExternalContactInfoId in the DB, but can't see anywhere to set this
> > >     in the gui.  Can I create a textbox for setting this field, then
> > >     form links out of it?
> >
> > Sure, you can do anything ;)
>
> Well, obviously I _could_ do that!  I was asking to check that it's
> sane, that is that 'RT' isn't internally using that field for something
> that I'd break (and/or that there's some simpler way of doing this that
> I've missed).

Thats pretty much what that db column is there for.

> > If you shifted the standard RT::Action::SendEmail elsewhere and created
> > your own RT::Action::SendEmail to override SetSubject (etc), and then
> > include RT::Action::SendEmail_Install, you'd be laughing.
> >
> That involves having to rename SendEmail.pm as SendEmail_Install.pm
> every time we do an upgrade.  There are too many other packages round
> here which either require a list of GBdirect mods on upgrading or which

A future innovation (currently in devel) with RT is the possibility of
RT-code-as-distributed and RT-code-for-local-override at the RT::Library
level.  Have a look at some mails from Jesse last month on rt-devel for
more information.

Note that as with any customisation of a public tool, you will need to be
careful that your modifications continue to work as intended after you
upgrade the base system.

-- 
                             Bruce Campbell                            RIPE
                   Systems/Network Engineer                             NCC
                 www.ripe.net - PGP562C8B1B                      Operations





More information about the rt-users mailing list