[Rt-commit] r2846 - in rt/branches/QUEBEC-EXPERIMENTAL: .
html/Ticket lib/RT/Action lib/RT/Interface
jesse at bestpractical.com
jesse at bestpractical.com
Fri May 6 16:43:35 EDT 2005
Author: jesse
Date: Fri May 6 16:43:33 2005
New Revision: 2846
Modified:
rt/branches/QUEBEC-EXPERIMENTAL/ (props changed)
rt/branches/QUEBEC-EXPERIMENTAL/html/Ticket/Update.html
rt/branches/QUEBEC-EXPERIMENTAL/lib/RT/Action/SendEmail.pm
rt/branches/QUEBEC-EXPERIMENTAL/lib/RT/Interface/Web.pm
Log:
r15840 at hualien: jesse | 2005-05-06 16:35:17 -0400
r14626 at hualien: jesse | 2005-04-29 13:06:57 -0400
* Message threading improvements suggested by Florian Weimer
Modified: rt/branches/QUEBEC-EXPERIMENTAL/html/Ticket/Update.html
==============================================================================
--- rt/branches/QUEBEC-EXPERIMENTAL/html/Ticket/Update.html (original)
+++ rt/branches/QUEBEC-EXPERIMENTAL/html/Ticket/Update.html Fri May 6 16:43:33 2005
@@ -121,15 +121,15 @@
</td></tr>
<tr><td align="right" valign="top"><&|/l&>Message</&>:</td><td>
<& /Elements/Callback, _CallbackName => 'BeforeMessageBox', %ARGS &>
-% { # localize %ARGS
-% local (%ARGS);
% if (exists $ARGS{UpdateContent}) {
+% # preserve QuoteTransaction so we can use it to set up sane references/in/reply to
+% my $temp = $ARGS{'QuoteTransaction'};
% delete $ARGS{'QuoteTransaction'};
<& /Elements/MessageBox, Name=>"UpdateContent", Default=>$ARGS{UpdateContent}, IncludeSignature => 0, %ARGS&>
+% $ARGS{'QuoteTransaction'} = $temp;
% } else {
<& /Elements/MessageBox, Name=>"UpdateContent", %ARGS &>
% }
-% }
</td></tr>
</table>
Modified: rt/branches/QUEBEC-EXPERIMENTAL/lib/RT/Action/SendEmail.pm
==============================================================================
--- rt/branches/QUEBEC-EXPERIMENTAL/lib/RT/Action/SendEmail.pm (original)
+++ rt/branches/QUEBEC-EXPERIMENTAL/lib/RT/Action/SendEmail.pm Fri May 6 16:43:33 2005
@@ -772,16 +772,30 @@
if ( !@references && scalar(@in_reply_to) ) {
@references = @in_reply_to;
}
-
- my $pseudo_ref = '<RT-Ticket-'.$self->TicketObj->id .'@'.$RT::Organization .'>';
+
+ my $pseudo_ref = $self->PseudoReference;
@references = grep { $_ ne $pseudo_ref } @references;
- $self->SetHeader( 'References', join( " ", ( @references, @msgid, $pseudo_ref )));
+ $self->SetHeader( 'References', join( " ", ( $pseudo_ref, @references, @msgid )));
}
# }}}
+=head2 PseudoReference
+
+Returns a fake Message-Id: header for the ticket to allow a base level of threading
+
+=cut
+
+sub PseudoReference {
+
+ my $self = shift;
+ my $pseudo_ref = '<RT-Ticket-'.$self->TicketObj->id .'@'.$RT::Organization .'>';
+ return $pseudo_ref;
+}
+
+
# {{{ SetHeadingAsEncoding
=head2 SetHeaderAsEncoding($field_name, $charset_encoding)
Modified: rt/branches/QUEBEC-EXPERIMENTAL/lib/RT/Interface/Web.pm
==============================================================================
--- rt/branches/QUEBEC-EXPERIMENTAL/lib/RT/Interface/Web.pm (original)
+++ rt/branches/QUEBEC-EXPERIMENTAL/lib/RT/Interface/Web.pm Fri May 6 16:43:33 2005
@@ -464,7 +464,11 @@
$old_txn->Load($args{ARGSRef}->{'QuoteTransaction'} );
if ($old_txn->Message->First) {
$Message->head->replace('In-Reply-To',$old_txn->Message->First->GetHeader('Message-Id'));
- $Message->head->replace('References',$old_txn->Message->First->GetHeader('Message-Id'). " ".$old_txn->Message->First->GetHeader('References') );
+ $Message->head->replace('References',
+ $old_txn->Message->First->GetHeader('References')
+ . " ".
+ $old_txn->Message->First->GetHeader('Message-Id')
+ );
}
}
More information about the Rt-commit
mailing list