UPGRADING FROM RT 4.4.0 and greater

The 5.0 release is a major upgrade and as such there are more changes than in a minor bugfix release (e.g., 4.4.0 to 4.4.1) and some of these changes are backward-incompatible. The following lists some of the notable changes, especially those that might require you to change a configuration option or other setting due to a change in RT. Read this section carefully before you upgrade and look for changes to features you currently use.

See devel/docs/UPGRADING-5.0 for internals changes relevant to extension writers, including deprecated code.

Upgrading Recommendations

RT now defaults to a database name of rt5.

If you are upgrading, you will likely want to specify that your database is still named rt4 or even rt3. Alternatively, you could import a backup of your database as rt5 to conform to the new default, although this isn't required.

Upgrading to RT 5 over an existing RT 4 installation is not recommended and will almost certainly cause issues. In Debian installing RT 5 will install to new locations.

If you aren't using dbconfig to manage your database, refer to /usr/share/doc/request-tracker5/NEWS.Debian.gz for details on how to upgrade your database. You may want to copy it to a new database first.

We take the approach of installing to new locations to allow running RT 4 and RT 5 side-by-side on Debian and also because of the large number of changes to the code base for this major release. We moved some things to new locations and old files are not removed as part of the upgrade process. If RT 5 was installed over the top of RT 4 then these old files will still be detected by RT in some cases and will cause issues.

Installing a fresh code base will also allow you to evaluate your local modifications and configuration changes as you migrate to 5.0. If you have changes made directly to the RT code, it's a good time to look at the hooks RT provides for custom code in extensions or in the local directory. See docs/writing_extensions.pod for more information.

Database Changes

Notable Changes

Extensions Integrated into RT 5

The following extensions are now part of RT 5. If you previously used any as an extension, you no longer need the extension after upgrading and can remove the Plugin line from your RT configuration.

Changes you may need to apply if you previously used the extension are described below.

RT::Extension::QuoteSelection
RT::Extension::RightsInspector
RT::Extension::ConfigInDatabase

If you previously used RT::Extension::ConfigInDatabase as an extension, run the /usr/share/request-tracker5/etc/upgrade/upgrade-configurations utility after completing all the other upgrade steps from the README. This will migrate your existing configuration to the new core RT tables.

RT::Extension::CustomRole::Visibility
RT::Extension::PriorityAsString

If you previously used numbers for priority and would like to continue to do so, you can set the new $EnablePriorityAsString option to false. That will disable the new string-based display.

We also now hide Final Priority by default, but if you previously used it and would like to continue to do so, you can add this to the Custom CSS section on the Theme editor:

    .FinalPriority, .TicketFinalPriority {
        display: flex;
    }
    .priority div.value .current-value {
        visibility: visible;
    }
    .priority div.value .current-value .FinalPriority {
        display: inline;
    }

If you would like to now use strings for priority like Low, Medium, High, check the new %PriorityAsString configuration option. RT provides a simple default setting that may be sufficient. Set new values if you would like to customize your priority options.

If you were previously using the PriorityAsString extension, you no longer need the extension installed. The %PriorityAsString> configuration is simplified and consolidated, so check the documentation for details on updating your previous configuration.

RT::Extension::AssetSQL

The configuration option $AssetSQL_HideSimpleSearch is now $AssetHideSimpleSearch. The configuration option $AssetSearchFormat is now $AssetSimpleSearchFormat.

See the configuration documentation in RT_Config.pm for new configuration options added for AssetSQL and the new asset query builder.

RT::Extension::LifecycleUI
RT::Extension::REST2
RT::Authen::Token

If you previously used RT::Authen::Token as an extension, run the /usr/share/request-tracker5/etc/upgrade/upgrade-authtokens utility after completing all the other upgrade steps from the README. This will migrate your existing tokens to the new core RT tables.

UPGRADING FROM 5.0.0 AND EARLIER

UPGRADING FROM 5.0.1 AND EARLIER

UPGRADING FROM 5.0.0 AND 5.0.1

This section duplicates upgrading notes for changes included in RT 4.4.5 and RT 5.0.2. These changes are duplicated here for users upgrading from RT 5.0.0 or 5.0.1 who won't run the RT 4.4.5 upgrade.

UPGRADING FROM 5.0.2 AND EARLIER

UPGRADING FROM 5.0.3 AND EARLIER

UPGRADING FROM 5.0.4 AND EARLIER

Update Messages Changed for Consistency

Some parts of RT, notably Bulk Update, previously could show update messages like:

    Ticket 123: Ticket 123: Status changed from 'new' to 'open'

This is fixed in RT 5.0.5. As part of this fix, some JSON responses sent for REST 2 operations are also updated. For example, an Article update message is changed:

    Old: Article More updates using REST: Name changed from...
    New: Article 123: Name changed from...

If you have any automation using REST 2 that checks these JSON response messages, you may need to update your system to match the new format.

UPGRADING FROM 5.0.5 AND EARLIER

Ticket Owner Updates and Notifications

When processing ticket updates, RT previously processed the reply/comment before processing other ticket updates, including owner changes. For RTs configured to send email to some users only when they are the ticket owner, this processing order resulted in new owners not seeing the reply/comment associated with the update that made them the new owner. This could cause confusion, especially if the reply/comment included information specifically addressed to the new owner.

To fix this issue, owner changes are now processed before messages, so new owners will now see the message associated with the change that made them owner.

This will result in new email being sent when it wasn't previously. We believe this fixes the previous incorrect behavior. However, if you relied on this behavior, and don't want the new email, you may need to modify your scrip configurations.

Spreadsheet (TSV) Download Format

The format of some column headers in spreadsheets (TSV files) downloaded from ticket search results has been updated. Specifically custom fields and custom roles no longer show "CustomField.{}" or "CustomRole.{}" in the header. Also, multi-word headers like "EmailAddress" now have spaces added so the header will appear like "Email Address".

This should make headers more readable, but if you have any automated processes that parse the headers, you will need to update your parsing code.

Running RT with MariaDB and MySQL 5.7

RT uses the perl module DBD::mysql to connect to MySQL-type databases, and before version 5.001, it worked with older MySQL versions like 5.7, newer versions like 8, and all versions of MariaDB. Starting with DBD::mysql 5.001, it supports only MySQL 8 and newer.

To align with this change, RT's configure script now has two new options available for --with-db-type. To run with MySQL 5.7 or older, use mysql5. To run with MariaDB, use MariaDB. These will configure the installer to use an older, compatible version of DBD::mysql.

If you install a newer version of DBD::mysql by mistake, you can uninstall it or manually force install a version older than 5.001.

Unlimited Option in SearchResultsPerPage Configuration

RT 5.0.4 added @SearchResultsPerPage as a configuration option to allow admins to control the options presented in the "Rows per page" dropdown in the Query Builder. When it was added, the "Unlimited" option was automatically added to the list of options configured. This prevented admins from removing the "Unlimited" option from the list, so this has been updated in RT 5.0.6 to use the configured options only with no other options added automatically.

If you previously set a custom @SearchResultsPerPage and you want to keep the "Unlimited" option, update your configuration and add "0" to your list.

UPGRADING FROM 5.0.7 AND EARLIER

Enabling Scheduled Processes in the Web UI

RT 5.0.8 adds a new page for administrators to schedule automated processes in the web UI. This allows SuperUsers to add and modify rt-crontool jobs that previously had to be managed on the server directly in cron.

To enable this, schedule the new utility bin/rt-run-scheduled-processes in cron to run every 15 minutes. This job will then run any jobs scheduled in the web UI.

UPGRADING FROM 5.0.8 AND EARLIER

Helpers/Autocomplete/Articles ModifySuggestion Callback Updated

The autocomplete helper endpoint at Helpers/Autocomplete/Articles has a callback ModifySuggestion. This callback mirrors similar callbacks in the Users and Groups endpoints. However, when it was added, the pattern in Users and Groups was not copied correctly and the callback passed the full array, even though it is called for each article, and it used a parameter "label" instead of "article" for the article object. This is now fixed and the ModifySuggestion callback in Articles follows the same pattern as Users and Groups.

Given the strange arguments in the previous callback, we think it's unlikely it is being used. However, if you were using this callback, you will need to update your code for the new parameters.

Log level of RT::Action::SetStatus unresolved messages

When calling RT::Action::SetStatus via rt-crontool, the operation will fail if the ticket has unresolved dependencies (linked tickets). This failure is logged and previously it used the "error" level. Since this is an informational message and not a system error, we have changed the log level for these "unresolved" messages to warning. All other failures are still error.

This makes it possible for admins to better tune error notifications and alert on errors, but not warnings based on linked tickets.

UPGRADING FROM 5.0.9 AND EARLIER

Links to RT from Android apps like Slack send a Referer header in the form android-app://com.slack/ and previously this generated an error because RT expected schemes that represented a host, like http[s]. The ReferrerWhitelist configuration option now accepts scheme as part of the configuration so you can whitelist Android apps now, e.g.

    Set(@ReferrerWhitelist, qw(android-app://com.slack/));

UPGRADING FROM 5.0.10 AND EARLIER

New $SecretKey configuration option

A new configuration option $SecretKey has been added. This key is used as keying material for cryptographic operations such as password-reset tokens, MFA-reset tokens, and TOTP secret encryption. When empty (the default), RT falls back to $DatabasePassword. We recommend setting this to a long, random value in RT_SiteConfig.pm so that application-level crypto is not coupled to the database credential. Set it before any user enrolls in MFA: changing it later (or changing $DatabasePassword while it is empty) makes stored TOTP secrets undecryptable, so all enrolled users have to reset MFA and re-enroll.

Self-service password reset (RT::Extension::ResetPassword integrated)

The extension RT::Extension::ResetPassword has been integrated into core RT. If you previously used the extension, you can remove the Plugin line from your RT configuration.

RT now provides a self-service password reset flow that lets users request a reset link via email. Admins can also send reset emails from the user admin page. A new global template PasswordReset is installed during the upgrade and is used for these emails.

If you previously used the extension, the following configuration options have been renamed. Update your RT_SiteConfig.pm accordingly:

    AllowUsersWithoutPassword       => ResetPasswordAllowUsersWithoutPassword
    CreateNewUserAndSetPassword     => ResetPasswordCreateNewUserAndSetPassword
    CreateNewUserAsPrivileged       => ResetPasswordCreateNewUserAsPrivileged
    PasswordChangeLinkExpirySeconds => ResetLinkExpirySeconds

A new configuration option $ResetRequestCooldown has been added to throttle consecutive reset emails for the same user (default: 300 seconds, i.e. 5 minutes).

$HidePasswordResetErrors now defaults to 1 (enabled). When enabled, all outcomes of a self-service reset request (user not found, user disabled, etc.) show the same generic success message, and every response takes at least one second, so the page doesn't reveal which addresses have active accounts. Set it to 0 to restore the old behavior where specific error messages are shown.

$DisableResetPasswordOnLogin now defaults to 1, so self-service reset is disabled: the "Forgot password?" link is hidden on the login page and the reset request page is blocked. Admins can still send reset emails from the user admin page. Sites that offered self-service reset through RT::Extension::ResetPassword must set $DisableResetPasswordOnLogin to 0 to keep it.

See the configuration documentation in etc/RT_Config.pm for full details on all options.

Enhanced password policy with per-group support

The $MinimumPasswordLength configuration option has been replaced by $PasswordPolicy, a hash reference that supports richer password complexity requirements including minimum length, character class requirements (uppercase, lowercase, digits, symbols), and a check that the password does not contain the username.

Important: $MinimumPasswordLength is no longer honored. Replace it with the new format:

    # Old
    Set($MinimumPasswordLength, 8);

    # New
    Set($PasswordPolicy, {
        Default => {
            MinLength => 8,
        },
    });

$PasswordPolicy supports separate policies for Privileged and Unprivileged users. In addition, individual user-defined groups can now have their own password policy set via the group admin page. When a user belongs to multiple groups with policies, the most restrictive settings across all groups are applied.

New $ExistingPasswordPolicyAction configuration option

New configuration option $ExistingPasswordPolicyAction controls how RT handles users whose existing password fails the current policy at login. Default is ignore so behavior is unchanged on upgrade. Set to notify to surface a flash message at login or force to gate users to a compliance-change page until they update their password. See "Enforcing Policy on Existing Passwords" in authentication for details.

Under force, REST 1.0 and REST 2.0 requests that log in with a username and password are rejected for users whose password fails the policy. API scripts for those users must switch to authentication tokens.

TOTP multi-factor authentication

RT now supports Time-based One-Time Password (TOTP) multi-factor authentication. When enabled, users can enroll using any standard authenticator app (Google Authenticator, Authy, etc.) by scanning a QR code. Enrolled users are prompted for a TOTP code after entering their password.

This feature adds two new columns (TOTPSecret and TOTPEnrolled) to the Users table. The database upgrade step adds these columns automatically. A new global template MFAReset is also installed during the upgrade.

The new $MFAPolicy configuration option controls MFA requirements. Like $PasswordPolicy, it supports separate settings for Default, Privileged, and Unprivileged users:

    Set($MFAPolicy, {
        Privileged => {
            Mode  => 'Required',
            Drift => 0,
        },
    });

Mode can be Off, Optional, or Required. Drift sets the number of 30-second TOTP windows accepted on each side of the current one (default: 0, maximum: 5) to accommodate clock drift between the authenticator device and the server. Use 1 to also accept one window before and after the current time.

Individual user-defined groups can also have their own MFA policy. When a user belongs to multiple groups with MFA policies, the most restrictive mode wins (Required beats Optional beats Off).

MFA enforcement is bypassed for sessions authenticated via REMOTE_USER or an RT::Authen::ExternalAuth SSO cookie, since the external authentication system (e.g. a SAML identity provider) is expected to handle its own second-factor requirements.

REST 1.0 and REST 2.0 requests that log in with a username and password are rejected for users whose MFA mode is Required, or Optional once they have enrolled. API scripts for those users must switch to authentication tokens.

This feature requires additional Perl dependencies: Auth::GoogleAuth, Crypt::URandom, CryptX, and Text::QRCode (which in turn needs the libqrencode system library). Run configure with --enable-mfa, then make testdeps, to check for missing modules.

Moving an Article Requires CreateArticle on the Destination Class

Changing an article's class now requires the CreateArticle right on the class the article is moved to, in addition to ModifyArticle on the article itself. This matches tickets and assets, which have always required CreateTicket on the new queue or CreateAsset on the new catalog when they are moved.

REST 2.0 accepts the ordinary web UI session cookie, and requests that rely on it are now checked for cross-site request forgery like the rest of the web UI. On a request that changes state, that is anything other than GET, HEAD, or OPTIONS, RT checks the Origin header, falling back to Referer, and rejects the request with a 403 unless it matches RT's own hostname or an entry in @ReferrerWhitelist. As with the web UI, this is governed by $RestrictReferrer.

Requests that supply credentials explicitly in an Authorization header, an authentication token or basic auth, are not affected.

Scripts that drive REST 2.0 with a saved session cookie and send neither Origin nor Referer are now rejected. Change them to use an authentication token, which is the supported way for a script to authenticate. See docs/authentication.pod for how to create one.

Simple templates with CreateTickets directives are limited to their own queue

A Simple template saved in a queue can now only create or update tickets in that same queue. Global templates are unaffected, as are users with ModifyTemplate granted globally. See the Rights section in RT::Action::CreateTickets.

← Back to index