[Rt-commit] rt branch, 4.4/fix-duplicated-one-time-addresses, created. rt-4.4.3-200-g3e0bf4531

? sunnavy sunnavy at bestpractical.com
Fri Feb 22 15:02:54 EST 2019


The branch, 4.4/fix-duplicated-one-time-addresses has been created
        at  3e0bf45312c4e149c3a14471c5bb2a2cb91b019e (commit)

- Log -----------------------------------------------------------------
commit 3e0bf45312c4e149c3a14471c5bb2a2cb91b019e
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Feb 23 02:47:16 2019 +0800

    Fix wrongly duplicated one-time addresses on ticket update page
    
    When user clicks address checkboxes below one-time inputs, RT will
    add/remove corresponding addresess to/from the corresponding one-time
    inputs, and when it's done, UpdateIgnoreAddressCheckboxes will be set to
    true to indicate RT to ignore those checkboxes at backend as they are
    already synced to one-time inputs.
    
    It didn't consider the case where people may submit form a few times
    before really updating the ticket, e.g. via searching/selecting
    articles, adding more attachments(the old UI), etc. If we don't keep the
    submitted UpdateIgnoreAddressCheckboxes value, it could be finally
    submitted with value 0 and RT will wrongly handle those checkboxes at
    backend, which could cause duplicated Cc/Bcc email addresses in outgoing
    emails.

diff --git a/share/html/Ticket/Elements/UpdateCc b/share/html/Ticket/Elements/UpdateCc
index a1fa20a36..5b11913c1 100644
--- a/share/html/Ticket/Elements/UpdateCc
+++ b/share/html/Ticket/Elements/UpdateCc
@@ -48,7 +48,7 @@
 % $m->callback(CallbackName => 'BeforeCc', ARGSRef => \%ARGS, Ticket => $TicketObj, one_time_Ccs => \@one_time_Ccs, txn_addresses => \%txn_addresses);
 
 <tr><td class="label"><&|/l&>One-time Cc</&>:</td><td><& /Elements/EmailInput, Name => 'UpdateCc', Size => undef, Default => $ARGS{UpdateCc}, AutocompleteMultiple => 1 &>
-<input type="hidden" id="UpdateIgnoreAddressCheckboxes" name="UpdateIgnoreAddressCheckboxes" value="0">
+<input type="hidden" id="UpdateIgnoreAddressCheckboxes" name="UpdateIgnoreAddressCheckboxes" value="<% $ARGS{UpdateIgnoreAddressCheckboxes} || 0 %>">
         <br />
 
 %if (scalar @one_time_Ccs) {

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


More information about the rt-commit mailing list