Safe to modify ScripActions table in database

I have manually added a row to the ScripActions table of the database.
Is this a bad thing to do in terms of future upgrades?
Is there a better way to make the changes?

thanks
Gordon

I have manually added a row to the ScripActions table of the database.
Is this a bad thing to do in terms of future upgrades?

Not sure, but I think not.

Is there a better way to make the changes?

You can edit etc/initialdata and run poke rt-setup-database for
inserting the new stuff. If you do so, it would be great if you
wrote a Wiki entry and replied with a link.

Richard

Gordon,

Probably not, as this table merely contains a POSSIBLE action and the 

code executed. The scrip table points to a certain record on the
"Action" table when a scrip is created. However, I really do not
understand why on earth would you do that rather than let RT do it (and
any other possible functions) for you when you create your
"user-defined" code in a scrip. It seems alot like inventing the wheel
all over again when there are numerous ones that can be used. Your
choice, I just do not see the advantage against possible risk.

Kenn
LBNLOn 10/20/2008 6:55 PM, gordon@cryologic.com wrote:

I have manually added a row to the ScripActions table of the database.
Is this a bad thing to do in terms of future upgrades?
Is there a better way to make the changes?

thanks
Gordon


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

Is there a better way to make the changes?

You can edit etc/initialdata and run poke rt-setup-database for
inserting the new stuff. If you do so, it would be great if you
wrote a Wiki entry and replied with a link.

I’m guessing /etc/initialdata would be overwritten on an upgrade

Gordon

Kenneth Crocker wrote:

Gordon,

Probably not, as this table merely contains a POSSIBLE action and the
code executed. The scrip table points to a certain record on the
"Action" table when a scrip is created. However, I really do not
understand why on earth would you do that rather than let RT do it (and
any other possible functions) for you when you create your
"user-defined" code in a scrip. It seems alot like inventing the wheel
all over again when there are numerous ones that can be used. Your
choice, I just do not see the advantage against possible risk.

In actual fact I don’t have to invent any code. The ScripActions table
basically contains various sets of watchers (eg.1 Owner, eg.2
Requestor,Cc) and RT modules to execute. I have just added another set
of watchers (AdminCc,Cc,Owner,OtherRecipients).

I am using it to reduce the number of duplicate emails people receive.
Instead of firing off separate scrips to notify Owner, AdminCc and Cc on
a Comment (which leads to duplicate emails if a person is added as one
type of watcher while they are already another), we now have one scrip
to email watchers on Comment. This works for us as we use the same
template to email all watchers.

Gordon

I have manually added a row to the ScripActions table of the database.
Is this a bad thing to do in terms of future upgrades?

Not sure, but I think not.

It’s ok, at some points it even required, for example when you write a
new action module.

Is there a better way to make the changes?

You can edit etc/initialdata and run poke rt-setup-database for
inserting the new stuff. If you do so, it would be great if you
wrote a Wiki entry and replied with a link.

Yep, this is the right way for extensions even if you’re not going to
publish them. It’s very easy to bundle your extension with
Module::Install::RTx available from the CPAN.

Richard


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.