In Request Tracker, a.k.a. RT, tickets that have a lot of correspondence tend to get long and hard to view with redundant email quotes. It's not hard to modify RT to make the quoted text collapsed. Here's how I did it with RT 3.8.3.
The first file to change is /opt/rt3/share/html/Ticket/Elements/ShowTransactionAttachments. Find these two lines and comment them out. RT handles quotes with arrow brackets and more with Text::Quoted by default. The handling is not appropriate as it will make too many levels in the quotes to handle easily. Commenting this code turns that off.
eval { require Text::Quoted; $content = Text::Quoted::extract($content); }; if ($@) { $RT::Logger->warning( "Text::Quoted failed: $@" ) }
The next step is extending MakeClicky. Place the following code in /opt/rt3/local/html/Callbacks/MyCallbacks/Elements/MakeClicky/Default:
<%ARGS> $types => [] $actions => {} </%ARGS> <%INIT> my $web_path = RT->Config->Get('WebPath'); $actions->{'truncate_quotes'} = sub { my %args = @_; my $rid = int(rand(100000)); my $color = 'A22'; return ' <div> <a href="" id="show'.$rid. '" style="color: #'.$color. '; font-weight: bold;" onclick="Effect.toggle(\'quote'.$rid. '\', \'slide\'); return false;">Toggle quoted message</a> <div id="quote'.$rid.'" style="display: none;">'.$args{value}.'</div> </div> '; }; my @customtypes = ( { name => "httpurl", regex => qr/$RE{URI}{HTTP}{-keep}{-scheme => 'https?'}/, action => "url", }, { name => "httpurl_overwrite", regex => qr/$RE{URI}{HTTP}{-keep}{-scheme => 'https?'}/, action => "url_overwrite", }, { name => 'truncate_arrowq', regex => qr/(^|\s)[>].*$/s, action => 'truncate_quotes', }, { name => 'truncate_outlookq', regex => qr/\s-----Original Message-----.*$/s, action => 'truncate_quotes', }, { name => 'truncate_underscoreq', regex => qr/\s_{5,}.*$/s, action => 'truncate_quotes', }, ); push(@$types, @customtypes); </%INIT>
This is the bit that will wrap the quoted text in a hidden div that can be toggled to be shown by the user. This uses RT's own install of scriptaculous to add toggle effects.
Almost done. The last part is telling RT we what to use the clickable link extensions. You'll do this in the /opt/rt3/etc/RT_SiteConfig.pm. Just add this line to turn on the changes we made.
Set(@Active_MakeClicky, qw(truncate_arrowq truncate_outlookq truncate_underscoreq));
Restart the web server and you'll now have more manageable quotes.
UPDATE: No longer as much of a hack. I found notes on extending MakeClicky. RT has yet to update its documentation to say that the custom actions go in /opt/rt3/local/html/Callbacks/MyCallbacks/Elements/MakeClicky/Default.

The collapsible quote regexes seem to require "top-posting." If any part of the new message is after the quoted message, then that too is collapsed along with the prior message.
The particular regex I notice this with is the "truncate_arrowq"
For instance, if I quote a piece of a prior message like this:
> something said before
and then go on to respond to it here, then the collapsible DIV will capture both the prior message after the arrow, but also this text right here, since this text is under that text.
Did you ever notice this or come up with a regex that would stop on the next blank line or next newline that did not begin with an arrow?
Thanks,
A