[Rt-commit] r2817 - in rt/branches/3.4-RELEASE: . html/Ticket lib/RT/Action lib/RT/Interface

jesse at bestpractical.com jesse at bestpractical.com
Fri Apr 29 13:11:30 EDT 2005


Author: jesse
Date: Fri Apr 29 13:11:27 2005
New Revision: 2817

Modified:
   rt/branches/3.4-RELEASE/   (props changed)
   rt/branches/3.4-RELEASE/html/Ticket/Update.html
   rt/branches/3.4-RELEASE/lib/RT/Action/SendEmail.pm
   rt/branches/3.4-RELEASE/lib/RT/Interface/Web.pm
Log:
 r14626 at hualien:  jesse | 2005-04-29 13:06:57 -0400
 * Message threading improvements suggested by Florian Weimer


Modified: rt/branches/3.4-RELEASE/html/Ticket/Update.html
==============================================================================
--- rt/branches/3.4-RELEASE/html/Ticket/Update.html	(original)
+++ rt/branches/3.4-RELEASE/html/Ticket/Update.html	Fri Apr 29 13:11:27 2005
@@ -115,15 +115,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/3.4-RELEASE/lib/RT/Action/SendEmail.pm
==============================================================================
--- rt/branches/3.4-RELEASE/lib/RT/Action/SendEmail.pm	(original)
+++ rt/branches/3.4-RELEASE/lib/RT/Action/SendEmail.pm	Fri Apr 29 13:11:27 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/3.4-RELEASE/lib/RT/Interface/Web.pm
==============================================================================
--- rt/branches/3.4-RELEASE/lib/RT/Interface/Web.pm	(original)
+++ rt/branches/3.4-RELEASE/lib/RT/Interface/Web.pm	Fri Apr 29 13:11:27 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