SiteConfig

From Request Tracker Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

What It Is

The SiteConfig file lives in ${RTHOME}/etc/RT_SiteConfig.pm. Its purpose is to provide you a place to override config settings in ${RTHOME}/etc/RT_Config.pm as well as add new config variables as provided by various user Contributions or for your own purposes.

All of the available configuration options are documented in RT_Config.pm and also available on the web.

You set a config variable like so:

Set($Foo, "Value of Foo");
Set($Bar, 1);
Set(@Baz, "array", "of", "values");
Set(%Zot, "hash" => "of", "keyed" => "values");

You access them like this in RT 3.8 and newer:

RT->Config->Get('Foo') # "Value of option Foo"
RT->Config->Get('Bar')  # 1
RT->Config->Get('Baz')->[0] # get option Baz that is array reference and access first element

Plugins

Set(@Plugins, qw(RT::Extension::ResetPassword RT::Extension::MandatorySubject));

The following is an invalid way to define extensions as each declaration will override the previous:

Set(@Plugins, qw(Extension::QuickDelete));
Set(@Plugins, qw(RT::Extension::ResetPassword));
Set(@Plugins, qw(RT::Extension::MandatorySubject));

Note there are only spaces between the (full) extension name and any spaces are allowed, so the following is also valid:

Set(@Plugins, qw(
   RT::Extension::ResetPassword
   RT::Extension::MandatorySubject
   RT::Extension::QuickDelete
));

Custom Statuses:

RT 4 and after: Lifecycles

RT 3.8 and prior: CustomStatuses