To celebrate the release of RTIR 4.0, we recorded a video showing a typical workflow and some key features of RTIR.
RT 4 adds many options you can put in your etc/RT_SiteConfig.pm totweak the way your RT looks and behaves for your users, as well as how RT works behind the scenes. Some of the new options are also available as individual user preferences by going to the Logged in as … → Settings → Options page.
In this blog post, we'll provide an overview of most of the new options.
$AutocompleteOwners and $UserAutocompleteFields
These options are discussed in our blog post on autocompletion.
Enable this to redirect to the created ticket display page automatically when using QuickCreate.
$MoreAboutRequestorExtraInfo, $MoreAboutRequestorGroupsLimit, and $MoreAboutRequestorTicketList
These options affect the "More about requestors" box on the ticket display page and will be discussed in a separate upcoming blog post about customizing the displayed requestor information. (If you're eager to customize this, read the sections in etc/RT_Config.pm.)
This determines if the "More about requestors" box on the ticket display page shows information about privileged users. By default it only shows information about unprivileged users.
By default, the simple search in the upper right corner only searches active tickets. If you want to search for a specific status, you can include the status in your search. If you want to search all ticekts regardless of status, disable this option.
When only one ticket is found in search, use this to redirect to the ticket display page automatically. Disabled by default.
Display a simple list of who will receive any kind of mail on the ticket reply page, instead of a detailed breakdown by scrip. Disabled by default.
Remembers the last queue you created a ticket in using the "New ticket in" button and queue list at the top of the page. If you haven't created a ticket in your current session, the Default Queue preference is used. Disabled by default.
When set to 1, the ticket display page will omit the ticket history until a link is clicked to load and display the history. This can be useful if you routinely browse long-running tickets but don't need to always read the history. Disabled by default.
Display the ticket create and update pages using two columns on screens that are wide enough. The new two column pages are much more effective at making more information visible on a single page, especially with many custom fields. Enabled by default.
Enable this option to display the Articles search and selection interface on the Ticket Create page in addition to the Reply/Comment page.
Enable this option to hide the search and include boxes from the Article UI. This assumes you have enabled the Article Hotlist feature on at least one of your Classes, otherwise you will have no access to Articles. This option does not hide the Articles link in the Tools menu.
The available flags under %FullTextSearch are discussed in our blog post on fast full-text searching in RT.
Lifecycles are a powerful way to describe custom workflows for your tickets on a per-queue basis. We'll be covering them in depth in an upcoming blog post. If you're feeling adventurous and would like to dive in early, there is a decent amount of documentation in the Lifecycles section of perldoc etc/RT_Config.pm.
Files in this list will be included in the CSS (squished and unsquished) that RT serves. Recommended if you want local CSS changes that apply to all themes. Alternatively, you can use the advanced section of the Theme editor if you don't need a file on disk.
A handful of options were removed in 4.0, because they were made obsolete by new features or we added a better way to change the behaviour. The most used options that are unsupported in 4.0:
The first three of these options affect what is now controlled by lifecycles. By defining your own lifecycle or modifying the default, you can reapply the functionality. The last option, $SuppressAutoOpenOnUpdate, can be customized by modifying the stock scrip On Correspond Open Tickets that ships with RT.
All the options RT supports are documented in etc/RT_SiteConfig.pm, along with their defaults. To set any of them to a different value for your installation, add the appropriate Set( $OptionName, 'value' ); line to your etc/RT_SiteConfig.pm, clear the mason cache, and restart your webserver. Be sure to only have one Set(...) line for each option, otherwise only the first one will take affect.
RT is commonly used to manage a lot of data. Unfortunately, prior toRT 4, it didn't support effective indexing of the content of comments or correspondence. RT 4 makes use of the full-text indexing capabilities of PostgreSQL and Oracle, or the external Sphinx library for MySQL, to efficiently index this content, allowing for high-speed searching of textual content. Due to bugs in version 4.0.0, you'll need version 4.0.1 or higher to take advantage of the full-text indexing detailed below.
By default, with no full-text indexes enabled, RT 4 does not allow
searching of the "Content" field at all, owing to how resource-intensive
unindexed full-text searches are. If you wish to enable non-indexed
full-text searching, like previous versions of RT allowed, you will need
to add the following to your
Set(%FullTextSearch, Enable => 1, Indexed => 0, );
The real magic comes from enabling your database's full-text indexes, however. For the section below, we'll be showing the configuration for PostgreSQL; we'll briefly address MySQL, which is slightly more complicated, at the end of this post.
If you intend to enable full-text indexed searches, you should also read
docs/full_text_indexing.pod file which shipped with your RT
install, which will provide roughly the same information as below, but
is additionally guaranteed to be up-to-date with your version of RT.
To start off with, you'll need to configure your database to store the
index. On PostgreSQL, this consists of adding a new column and creating
an index on it. To do this, run
$ /opt/rt4/sbin/rt-setup-fulltext-index Enter the name of a DB table that will be used to store the Pg tsvector. You may either use the existing Attachments table, or create a new table. [Attachments]: Enter the name of a column that will be used to store the Pg tsvector: [ContentIndex]:
Generally, you'll want to store the new column in the Attachments table, right next to the data it is indexing. If you want to back up the index separately, or have other storage constraints, you may wish to create a new table to store it, but the default is almost certainly correct. Similarly, the default column name is also most likely correct.
You may choose between GiST or GIN indexes; the former is several times slower to search, but takes less space on disk and is faster to update. [GiST]:
You can read more about the differences between the index types in the PostgreSQL manual.
Going to run the following in the DB: ALTER TABLE Attachments ADD COLUMN ContentIndex tsvector Going to run the following in the DB: CREATE INDEX ContentIndex_idx ON Attachments USING gist(ContentIndex) You can now configure RT to use the newly-created full-text index by adding the following to your RT_SiteConfig.pm: Set( %FullTextSearch, Enable => 1, Indexed => 1, Column => 'ContentIndex', Table => 'Attachments', );
At this point, your database has been configured. Ensure that you add
Set(...) block that
rt-setup-fulltext-index output (which may be
different from the above!) to your
RT_SiteConfig.pm before continuing.
Your index now exists, but is empty. In order to fill it, we must find
and index every textual attachment in RT using
--all. This can be a very time-consuming task, so be prepared for it
to take a while. It can be interrupted and resumed safely, however.
Once it has finished, you will need to schedule
run at regular intervals to pick up new additions to the database. This
is easiest done by running
ln -s /opt/rt4/sbin/rt-fulltext-indexer
/etc/cron.hourly, which will ensure that it runs once an hour, but many
other alternatives are possible. Depending on how fast tickets are
created in your system, running it as frequently as once every two to
five minutes may be possible.
The story on MySQL is unfortunately considerably more complicated, as
MySQL does not natively support a full-text index format. It integrates
with the external Sphinx search library, but
this requires recompiling MySQL to include the SphinxSE engine which
allows MySQL queries to retrieve data from the Sphinx
While many vendors package the external Sphinx tools, none of them ships
a MySQL package which has been compiled with SphinxSE at the time of
writing. As such, this is most likely not for the faint of heart, or
those only just getting their feet wet with system administration.
Despite that, the process of recompiling MySQL with SphinxSE is fairly straightforward. Full instructions are provided in the Sphinx documentation. Sphinx 2.0.1 has been tested to work with both MySQL 5.0 and 5.1; it is not compatible with MySQL 5.5 at this time.
Once a SphinxSE-enabled MySQL has been installed, the configuration
proceeds roughly as for PostgreSQL, above. First, you must run
rt-setup-fulltext-index, which will ensure that your MySQL is
correctly configured with SphinxSE, then prompt you for additional
$ /opt/rt4/sbin/rt-setup-fulltext-index Enter name of a new MySQL table that will be used to connect to the Sphinx server: [AttachmentsIndex]: Enter URL of the sphinx search server; this should be of the form sphinx://<server>:<port>/<index name> [sphinx://localhost:3312/rt]:
In order to communicate with the Sphinx
searchd server, we create a
virtual SphinxSE table in the database. This table hence needs to know
where your Sphinx
searchd server is running. The default is usually
correct if you are planning to run
searchd on your database server on
the default port.
Maximum number of matches to return; this is the maximum number of attachment records returned by the search, not the maximum number of tickets. Both your RT_SiteConfig.pm and your sphinx.conf must agree on this value. Larger values cause your Sphinx server to consume more memory and CPU time per query. :
This is an unfortunate limitation imposed by the design of Sphinx; 10000
should be sufficient for most purposes, but you may need to increment
this number if you have tickets with an extremely large number of
transactions which match your common search criteria. If you wish to
change this number later, you must alter it in both
Going to run the following in the DB: CREATE TABLE AttachmentsIndex ( id INTEGER UNSIGNED NOT NULL, weight INTEGER NOT NULL, query VARCHAR(3072) NOT NULL, INDEX(query) ) ENGINE=SPHINX CONNECTION="sphinx://localhost:3312/rt" CHARACTER SET utf8 You can now configure RT to use the newly-created full-text index by adding the following to your RT_SiteConfig.pm: Set( %FullTextSearch, Enable => 1, Indexed => 1, Table => 'AttachmentsIndex', MaxMatches => '10000', );
It will also output a sample
sphinx.conf file. At this point, your
database has been configured. Ensure that you add the
rt-setup-fulltext-index output (which may be different from the
above!) to your
RT_SiteConfig.pm before continuing.
Your index now exists, but is empty. In order to fill it, we must run the Sphinx indexer:
$ indexer rt Sphinx 2.0.1-beta (r2792) Copyright (c) 2001-2011, Andrew Aksyonoff Copyright (c) 2008-2011, Sphinx Technologies Inc (http://sphinxsearch.com) using config file '/etc/sphinx.conf'... indexing index 'rt'... collected 133809 docs, 1015.6 MB sorted 137.2 Mhits, 100.0% done total 133809 docs, 1015645236 bytes total 144.967 sec, 7006036 bytes/sec, 923.02 docs/sec total 400 reads, 6.474 sec, 637.6 kb/call avg, 16.1 msec/call avg total 582 writes, 2.473 sec, 959.3 kb/call avg, 4.2 msec/call avg
Finally, you will need to start the
$ searchd Sphinx 2.0.1-beta (r2792) Copyright (c) 2001-2011, Andrew Aksyonoff Copyright (c) 2008-2011, Sphinx Technologies Inc (http://sphinxsearch.com) using config file '/etc/sphinx.conf'... listening on all interfaces, port=3312 precaching index 'rt' precached 1 indexes in 0.033 sec
You will need to re-index the data using
indexer --rotate rt at
regular intervals. Since Sphinx does not do incremental indexing, but
rather re-indexes all content each time it is run, a "main+delta"
split of the
data may be necessary to reduce index update time sufficiently to allow
close to real-time indexing.
As a ticket grows long in the tooth, correspondence which quotes the entire history of the conversation can balloon to become extremely large and unwieldy. It can be taxing just to find the new content of incoming email amidst all its history.
RT 4.0 makes this more manageable by folding away quoted content during ticket display. This lets you focus on what's important: the new text. When you do need to see the quoted text, it's still there, hidden behind a click. Now when you look at a ticket, you won't have to mentally skim over quoted lines or paragraphs. Quote folding makes reading a ticket's correspondence and history far more comfortable.
When you expand those folded-away quotes by clicking "Show folded text", you'll see that RT 4.0 now also colors nested quotes differently, so you can easily distinguish who wrote which text. The nesting level of each quote becomes more apparent when colored. Let RT count the angle brackets for you.
Our quote folding is robust enough to understand various quoting disciplines, whether it be top-posting, interleaved, or bottom-posting. You also don't have to stick with > to indicate quotations; RT recognizes many other kinds of quote markers.
Along with quote folding, we've improved how RT 4 displays HTML content in ticket history. One way that a lot of people quote text is by coloring the original text or the new content in their response. To facilitate such quoting, RT 3.8.2 and later display colors specified in HTML mail. RT 4.0 improves our HTML mail handling further. RT 4 understands more ways that mail client generates text styling, especially Microsoft Outlook. We also permit more kinds of styling, such as font-family and font-size.
We completely revamped the user and group rights editor for RT 4. The new editor features a number of usability improvements:
- Only the users or user-defined groups with rights granted to them are shown. This means you don't see every privileged user in the system when you just want to change rights for one. It also makes the editing rights much faster for systems with large numbers of users or groups.
- Each right has a description which helps you find the one you actually want. If you're used to the short right names like us, you can click on those too.
- Rather than a tiny select box or one long list, the rights are now grouped into logical tabs based on the most common type of user you might grant them to. The tabs are just suggestions though, and there are bound to be times when you want, for example, Requestors to have a right normally reserved for your staff.
- Any subgroups of a group are shown next to the group name when you're editing rights. This quickly shows who else will inherit the rights you add or remove.
Adding rights to a user or group
If the group already has rights granted to it, simply click on the group name, click the rights you want to add, and Save Changes.
If the group doesn't have existing rights, begin typing its name into the Add Group field, and a list of autocompleted options will pop up. Choose the group you're looking for and then click on the rights you want to add, saving changes when you're done.
Removing all rights from a user or group
Uncheck every right from the user/group and click Save Changes. You should see a number of Right Revoked status messages (one for each right previously granted), and the user/group shouldn't appear in the left hand list. If they still appear, then you likely missed a right and should check again.