[Rt-commit] rt branch, 4.2/squelched-recipients, created. rt-4.2.5-163-g1c4bcde

Wallace Reis wreis at bestpractical.com
Mon Jul 14 16:19:09 EDT 2014


The branch, 4.2/squelched-recipients has been created
        at  1c4bcde50d73803fb2b54f1078b82b999dd2f988 (commit)

- Log -----------------------------------------------------------------
commit 1c4bcde50d73803fb2b54f1078b82b999dd2f988
Author: Wallace Reis <wreis at bestpractical.com>
Date:   Mon Jul 14 17:11:32 2014 -0300

    Add squelched recipients as preference
    
    User preference to start with squelch checkboxes unchecked/checked on
    ticket reply page. This should respect the semi-permanetly squelched
    address when applying its logic. If set to true, then the page shows
    the checkboxes unchecked - which means the email addresses are *not*
    getting any kind of mail.
    Additionally, it adds a new config option called $SquelchedRecipients
    which allows to set it broadly for all users.

diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index 09eb3dd..619dafb 100755
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -1578,6 +1578,16 @@ detailed breakdown by scrip.
 
 Set($SimplifiedRecipients, 0);
 
+=item C<$SquelchedRecipients>
+
+If C<$SquelchedRecipients> is set, the checkbox list of who will receive
+B<any> kind of mail on the ticket reply page are displayed initially as
+B<un>checked - which means nobody in that list would get any mail.
+
+=cut
+
+Set($SquelchedRecipients, 0);
+
 =item C<$HideResolveActionsWithDependencies>
 
 If set to 1, this option will skip ticket menu actions which can't be
diff --git a/lib/RT/Config.pm b/lib/RT/Config.pm
index 7c75d0e..658f88b 100644
--- a/lib/RT/Config.pm
+++ b/lib/RT/Config.pm
@@ -455,10 +455,19 @@ our %META;
             Description => "Show simplified recipient list on ticket update",                #loc
         },
     },
+    SquelchedRecipients => {
+        Section         => 'Ticket display',                       #loc
+        Overridable     => 1,
+        SortOrder       => 8,
+        Widget          => '/Widgets/Form/Boolean',
+        WidgetArguments => {
+            Description => "Start with squelch checkboxes unchecked/checked on ticket update", #loc
+        },
+    },
     DisplayTicketAfterQuickCreate => {
         Section         => 'Ticket display',
         Overridable     => 1,
-        SortOrder       => 8,
+        SortOrder       => 9,
         Widget          => '/Widgets/Form/Boolean',
         WidgetArguments => {
             Description => 'Display ticket after "Quick Create"', #loc
@@ -467,7 +476,7 @@ our %META;
     QuoteFolding => {
         Section => 'Ticket display',
         Overridable => 1,
-        SortOrder => 9,
+        SortOrder => 10,
         Widget => '/Widgets/Form/Boolean',
         WidgetArguments => {
             Description => 'Enable quote folding?' # loc
diff --git a/share/html/Ticket/Elements/PreviewScrips b/share/html/Ticket/Elements/PreviewScrips
index 973fe0d..7695f60 100644
--- a/share/html/Ticket/Elements/PreviewScrips
+++ b/share/html/Ticket/Elements/PreviewScrips
@@ -77,7 +77,9 @@ my %squelched = ProcessTransactionSquelching( \%ARGS );
               <ul>
 %             for my $addr (@addresses) {
                   <li>
+%                 my $squelched_recipients = RT->Config->Get('SquelchedRecipients', $session{'CurrentUser'});
 %                 my $checked = not $squelched{$addr->address};
+%                    $checked = $checked ? not $squelched_recipients : $checked;
 %                 $m->callback(CallbackName => 'BeforeAddress', Ticket => $TicketObj, Address => $addr, Type => $type, Checked => \$checked);
 %                 $recips{$addr->address}++;
                   <b><%loc($type)%></b>: <input type="checkbox" class="checkbox" name="TxnSendMailTo" <% $checked ? 'checked="checked"' : '' |n%> value="<%$addr->address%>" id="TxnSendMailTo-<% $addr->address %>-<% $recips{$addr->address} %>" />

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


More information about the rt-commit mailing list