[Rt-commit] rtir branch, 3.0/consistent-signature, created. 3.0.0rc1-52-g0fe3e55

? sunnavy sunnavy at bestpractical.com
Tue Apr 23 12:10:28 EDT 2013


The branch, 3.0/consistent-signature has been created
        at  0fe3e557f8d4a959648fdb2c79033477570417e3 (commit)

- Log -----------------------------------------------------------------
commit bf7e231c52157219e657543026d6781de268f911
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue Apr 23 23:18:12 2013 +0800

    include signature consistently for investigation form along with incident creation
    
    previously, if you have an IR and make a new Incident and click in the upper
    right on Investigation (so you create an incident and an investigation at the
    same time) your Investigation lacks a signature, which is wrong.
    
    see also #23707

diff --git a/html/RTIR/Incident/Create.html b/html/RTIR/Incident/Create.html
index a8f8155..c215c0c 100644
--- a/html/RTIR/Incident/Create.html
+++ b/html/RTIR/Incident/Create.html
@@ -157,27 +157,6 @@ if ( $ChildObj && !$ChildObj->CurrentUserHasRight('ModifyTicket') ) {
 
 <tr><td class="labeltop"><&|/l&>Message</&>:</td>
 <td>
-<%PERL>
-my $include_signature = 1;
-unless ( exists $ARGS{'Content'} ) {
-    my $Transactions;
-    if ( $SplitObj ) {
-        $Transactions = $SplitObj->Transactions;
-    } elsif ( $ChildObj ) {
-        $Transactions = $ChildObj->Transactions;
-    }
-    if ( $Transactions ) {
-        $ARGS{'Content'} = $m->scomp("/RTIR/Elements/TransactionData",
-            Transactions => $Transactions,
-            Type         => 'messages',
-            Include      => ['Create', 'Correspond'],
-        ) || '';
-        $ARGS{'Content'} =~ s/\>/>/g;
-    }
-} else {
-    $include_signature = 0;
-}
-</%PERL>
 <& /Elements/MessageBox,
     Default => $ARGS{'Content'},
     IncludeSignature => $include_signature,
@@ -264,6 +243,7 @@ unless ( exists $ARGS{'Content'} ) {
     NamePrefix => 'Investigation',
     Queue => 'Investigations',
     SkipField => { Owner => 1, Attachments => 1, DateFields => 1 },
+    IncludeSignature => $include_signature,
 &>
 <& /Elements/Submit,
     Name => 'CreateWithInvestigation',
@@ -445,6 +425,25 @@ PageMenu->child(
     . q[>] . loc('Launch Investigation') . q[</a>]
 );
 
+my $include_signature = 1;
+unless ( exists $ARGS{'Content'} ) {
+    my $Transactions;
+    if ( $SplitObj ) {
+        $Transactions = $SplitObj->Transactions;
+    } elsif ( $ChildObj ) {
+        $Transactions = $ChildObj->Transactions;
+    }
+    if ( $Transactions ) {
+        $ARGS{'Content'} = $m->scomp("/RTIR/Elements/TransactionData",
+            Transactions => $Transactions,
+            Type         => 'messages',
+            Include      => ['Create', 'Correspond'],
+        ) || '';
+        $ARGS{'Content'} =~ s/\>/>/g;
+    }
+} else {
+    $include_signature = 0;
+}
 </%INIT>
 
 <%ARGS>
diff --git a/html/RTIR/Investigation/Elements/Create b/html/RTIR/Investigation/Elements/Create
index 6e8d757..6377ddb 100644
--- a/html/RTIR/Investigation/Elements/Create
+++ b/html/RTIR/Investigation/Elements/Create
@@ -129,7 +129,7 @@ email addresses. These people <b>will</b> receive future updates.)</&></font></i
 <& /Elements/MessageBox,
     Name             => $NamePrefix .'Content',
     Default          => $content,
-    IncludeSignature => !$content,
+    IncludeSignature => exists $ARGS{'IncludeSignature'} ? $ARGS{'IncludeSignature'} : !$content,
     QuoteTransaction => $value_cb->('QuoteTransaction'),
 &></td></tr>
 % }

commit 0fe3e557f8d4a959648fdb2c79033477570417e3
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue Apr 23 23:43:06 2013 +0800

    respect config MessageBoxIncludeSignatureOnComment

diff --git a/html/RTIR/Update.html b/html/RTIR/Update.html
index 7ff0a08..a56aead 100644
--- a/html/RTIR/Update.html
+++ b/html/RTIR/Update.html
@@ -107,6 +107,7 @@
     <td class="value"><input type="text" name="UpdateSubject" value="<% $Subject || '' %>" /></td>
 </tr>
 
+% $ARGS{IncludeSignature} = 0 if $Action ne 'Respond' && !RT->Config->Get('MessageBoxIncludeSignatureOnComment');
 <& /RTIR/Elements/UpdateData, %ARGS, Ticket => $Ticket, Type => 'Incident', GnuPGWidget => $gnupg_widget &>
 
 </table>

-----------------------------------------------------------------------


More information about the Rt-commit mailing list