Last Comment Bug 208628 - Copies & Folders: Initialize Bcc field to the current address
: Copies & Folders: Initialize Bcc field to the current address
Product: MailNews Core
Classification: Components
Component: Account Manager (show other bugs)
: Trunk
: All All
P2 enhancement (vote)
: Thunderbird 13.0
Assigned To: :aceman
: 221523 (view as bug list)
Depends on:
Blocks: 810763
  Show dependency treegraph
Reported: 2003-06-07 07:39 PDT by Bruce K Gillespie
Modified: 2013-03-26 12:53 PDT (History)
4 users (show)
acelists: in‑testsuite+
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

init BCC and CC if selected, clear them if deselected (2.17 KB, patch)
2011-12-23 11:38 PST, :aceman
bwinton: ui‑review+
Details | Diff | Splinter Review
patch v2 (3.42 KB, patch)
2012-01-15 15:08 PST, :aceman
standard8: review+
bwinton: ui‑review+
Details | Diff | Splinter Review
patch v3 (3.41 KB, patch)
2012-02-20 14:18 PST, :aceman
acelists: review+
Details | Diff | Splinter Review

Description User image Bruce K Gillespie 2003-06-07 07:39:19 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030529
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030529

When selecting bcc in the copies & folders for an account is does not fill in
the address.

Reproducible: Always

Steps to Reproduce:
1. For an account. Select Copies & Folders.
2. Click the Bcc button.

Actual Results:  
Address field is blank.

Expected Results:  
Address field should be filled in with the current accounts address.

This was behaviour in 1.3.1 and before.
Comment 1 User image Mike Cowperthwaite 2004-04-04 14:07:09 PDT
*** Bug 221523 has been marked as a duplicate of this bug. ***
Comment 2 User image Mike Cowperthwaite 2004-04-05 08:28:16 PDT
The difference that this bug complains about was implemented specifically in the 
fix for bug 178328.  Previously there were three checkboxes for managing Sent 
messages; the two regarding Bcc: were combined into one.

It seems a reasonable request to ask that the text field be initialized to the 
account's default identity, so I'm changing this bug to an enhancement and 
tweaking the summary accordingly.
Comment 3 User image Gervase Markham [:gerv] 2005-09-27 01:55:15 PDT
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Comment 4 User image Gervase Markham [:gerv] 2005-10-13 10:26:32 PDT
This bug has been automatically resolved after a period of inactivity (see above
comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Comment 5 User image Karsten Düsterloh 2010-07-19 14:41:05 PDT
Still valid and reasonable.
Comment 6 User image :aceman 2011-11-06 12:54:13 PST
It seems I could try to patch this.
Comment 7 User image :aceman 2011-12-23 11:38:42 PST
Created attachment 584094 [details] [diff] [review]
init BCC and CC if selected, clear them if deselected
Comment 8 User image Blake Winton (:bwinton) (:☕️) 2011-12-27 07:17:37 PST
Comment on attachment 584094 [details] [diff] [review]
init BCC and CC if selected, clear them if deselected

So, I mostly like this, but there is an odd case that I'm not sure about.

If I check "Cc", then delete my email address, then un-check "Cc", then re-check it, I don't think I expect to see my email address appear there again…

It would help mitigate this if, when I clicked "Cc", the text field was focused, and my email address was selected, so that if I didn't want it (or wanted a different address), all I would need to do would be to hit delete (or start typing).

But that's a fairly minor complaint, and fairly minor change to help it, so I'll say ui-r=me with that implemented.

Comment 9 User image :aceman 2012-01-15 15:08:48 PST
Created attachment 588780 [details] [diff] [review]
patch v2

Select BCC field if we initialized it. Clear the emails when it is deselected and it is still at out inited value. Do not touch other user-edited value. (The value is only lost if the user moves to other account and selects Copies & Folders there (see further)).
This change made a variant of bug 690277 visible here (it was here even before this patch I think).
Select Copies & Folders in one account, set some values in the BCC textbox. Directly move to Copies & Folders in another account that does not have any values set in the textbox (and the BCC checkbox is not set).
Now you will see the values from the first account in the textbox, instead of the placeholder ("Separate addresses with commas").
So I try to remedy that by clearing the textbox on initial display of the preferences pane (Copies & Folders) of each account: if the value of the textfield was empty initially (.getAttribute("value")) then clear the .value . I don't know if that is correct, but it worked for me satisfactorily. Please test thoroughly.
Comment 10 User image Blake Winton (:bwinton) (:☕️) 2012-01-16 12:53:53 PST
Comment on attachment 588780 [details] [diff] [review]
patch v2

Yeah, that feels better.  Not perfect, but definitely good enough to get a ui-r=me!  :)

Comment 11 User image Mark Banner (:standard8) 2012-02-20 13:02:59 PST
Comment on attachment 588780 [details] [diff] [review]
patch v2

Review of attachment 588780 [details] [diff] [review]:

r=me with the comments fixed.

::: mailnews/base/prefs/content/am-copies.js
@@ +365,5 @@
> +
> +    if (ccChecked) {
> +        if (ccTextbox.value == "") {
> +            ccTextbox.value = document.getElementById("").value;
> +            if (!init);

nit: put the; on the next line please (same with the bcc function).

@@ +369,5 @@
> +            if (!init);
> +        }
> +    } else {
> +        if ((ccTextbox.value == document.getElementById("").value)
> +            || (init && ccTextbox.getAttribute("value") == ""))

nit: In mailnews we put the || at the end of the first line. You can also make this into a straight else if.
Comment 12 User image :aceman 2012-02-20 14:18:04 PST
Created attachment 598960 [details] [diff] [review]
patch v3
Comment 13 User image :aceman 2012-02-20 14:18:58 PST
Thanks, fixed.
Comment 14 User image Mark Banner (:standard8) 2012-02-21 04:34:52 PST
Checked in:
Comment 15 User image :aceman 2013-03-26 12:53:29 PDT
Test in bug 810763.

Note You need to log in before you can comment on or make changes to this bug.