RenameInstance

From Request Tracker Wiki
Revision as of 15:36, 6 April 2016 by Admin (talk | contribs) (2 revisions imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This page describes what you have to do to change the name of an RT instance (rtname SiteConfig option).

Pristine Instance

If you've just installed RT and have not created any tickets as of yet, you only have to

  • change the instance name in the rtname SiteConfig option.

Operational Instance

If there are already tickets in the instance, things are a little more complicated.

RT 3.6.x

In RT 3.6 a new EmailSubjectTagRegex config option had been added which makes renaming much easier. You have to do:

  • change the name in the rtname config option.
  • write regexp that matches both names: old and new one, and set EmailSubjectTagRegex option

For example old name is old.name and new one is new.name, then your config should look like:

Set($rtname, 'new.name');
Set($EmailSubjectTagRegex, qr/(?:old\.name|new\.name)/i);

This regular expression is required for some period of time only. Later you can delete this option when all active tickets will be using new subject line.

Older versions

  • change the name in the rtname config option.
  • set up an email filter that rewrite subjects or hack the EmailParser a little to understand the old value, so people don't get errors if they send messages with the old rtname in the subject.

In Postgres :

update transactions set data = replace ( data, '<OLDNAME>', '<NEWNAME>') where data ~ '<OLDNAME>';

update attachments set subject = replace ( subject, '<OLDNAME>', '<NEWNAME>') where subject ~ '<OLDNAME>';

and so on.