Closed
Bug 79245
Opened 23 years ago
Closed 23 years ago
Offline: Shouldn't prompt to send Unsent if there aren't unsent messages.
Categories
(SeaMonkey :: MailNews: Backend, defect, P2)
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla0.9.5
People
(Reporter: laurel, Assigned: Bienvenu)
References
Details
(Whiteboard: #79865 has the combined patch, PDT+)
Attachments
(6 files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
sspitzer
:
review+
mscott
:
superreview+
|
Details | Diff | Splinter Review |
Using may 07 commercial trunk build.
When going from Offline state back to Online I'm getting asked if I want to send
unsent messages when there is nothing to send.
I believe 4.x didn't prompt if the Unsent Messages folder was empty.
1. Go to mail login to (IMAP) account.
2. Go to Local Folders/Unsent Messages, make sure it is empty.
3. File|Work Offline. (I didn't download anything... simple case.)
4. File|Work Online.
Result: Prompt appears about sending Unsent messages when going online.
Expected: Nothing, no prompt since I have no unsent messages.
OK, a special check needs to be added in to check the msg # of the Unsent folder
in order to decide if prompt the UI.
Reassign to Mohanb.
Assignee: dianesun → mohanb
*** Bug 83029 has been marked as a duplicate of this bug. ***
Updated•23 years ago
|
Priority: -- → P2
Target Milestone: --- → mozilla0.9.2
Comment 4•23 years ago
|
||
Assignee | ||
Comment 5•23 years ago
|
||
Mohan, are most of these diff whitespace diffs? If so, you can do a diff -uw to
eliminate the whitespace diffs and just show the relevant changes. If that's the
case, could you attach a new diff? Thanks!
Comment 6•23 years ago
|
||
Assignee | ||
Comment 7•23 years ago
|
||
In check for unsent messages, you should break out of that loop if you find that
any identity has unsent messages.
Also, why are you adding brace style like the following:?
if (a)
{ do something }
that's pretty non-standard, and seems not needed either.
Comment 8•23 years ago
|
||
Updated•23 years ago
|
Whiteboard: [PDT+] → [PDT+] requesting r & sr
Comment 10•23 years ago
|
||
cc'ing bhuvan for review & sspitzer for super review;
Comment 11•23 years ago
|
||
I can review this to unload bhuvan some... :)
+ allIdentities = am.allIdentities;
Does |allIdentities| already exist, or did you forget to declare it with var?
+ var msgFolder = new Object();
I'm having a FUD issue with this line 'o code... Is this really needed? Remember
that we're inside a for-loop when doing this... It might be expensive, memory-wise.
+ if (msgFolder.value) {
.value? What is the check here meant to do? Check if msgFolder is non-null?
+ var numMessages = msgFolder.value.getTotalMessages(false);
is value really a part of the XPCOM object, so getTotalMessages() is declared in
the value property of msgFolder?
Sorry if I'm asking dumb questions, but I don't understand some parts of your code.
Comment 12•23 years ago
|
||
Comment 13•23 years ago
|
||
+ allIdentities = am.allIdentities;
var declared.
+ var msgFolder = new Object();
kept out of the loop.
+ if (msgFolder.value) {
.value? To check whether msgFolder has got proper value from
GetUnsentMessagesFolder?
+ var numMessages = msgFolder.value.getTotalMessages(false);
Yes, getTotalMessages() is declared in the value property of msgFolder?
Comment 14•23 years ago
|
||
+ var msgFolder;
[...]
+ msgFolder = new Object();
Make that |var msgFolder = new Object();| .
+ numMessages = msgFolder.value.getTotalMessages(false);
Sorry, I still don't understand this one. getTotalMessages() is a function of
the nsIMsgFolder interface - nothing else. For an example look at
/mailnews/base/resources/content/mail3PaneWindowCommands.js, line 955.
One further question is, since that code obviously should not work - does it
even work for you? Did you test your fix with multiple accounts and unsent
messages in your unsent folder?
Comment 15•23 years ago
|
||
Comment 16•23 years ago
|
||
----------------
1. I am passing a new Object() to msgSendlater along with current Identity;
2. msgFolder.value is an "nsIMsgFolder" interface;
3. /mailnews/base/resources/content/mail3PaneWindowCommands.js, line 955 is an
"nsIMSgFolder" interface obtained from RDF;
4. I think if you look at
GetUnsentMessagesFolder(currentIdentity, returnMsgFolder) for the
msgSendlater it will be more clear;
5. look at commandglue.js : 822 to know how to pass a out parameter to the
function getFoldersWithFlag(MSG_FOLDER_FLAG_TRASH, 1, out); and usage of
out.value;
822 var out = new Object();
823 var trashFolder =
rootFolder.getFoldersWithFlag(MSG_FOLDER_FLAG_TRASH, 1, out);
824 numFolder = out.value;
----------------
Comment 17•23 years ago
|
||
r=hwaara. Note to the super-reviewer of this code: please check if it's just me
on crack regarding the .value thing. I still don't think it should be there.
Updated•23 years ago
|
Whiteboard: [PDT+] requesting r & sr → [PDT+] requesting sr
Updated•23 years ago
|
Whiteboard: [PDT+] requesting sr → [PDT+] requesting sr Planning for checkin by FRI : 06/22
Updated•23 years ago
|
Whiteboard: [PDT+] requesting sr Planning for checkin by FRI : 06/22 → [PDT+] requesting sr
Comment 18•23 years ago
|
||
Who is the sr= person for this bug? Please use all means to ensure they know
you've made the request.
Comment 19•23 years ago
|
||
seth, can I get sr=;
Comment 20•23 years ago
|
||
does this patch even work? it looks like it would give you a js error.
you added a function CheckForUnsentMsgs(), but you call CheckForUnsentMessages()
in one place.
please double check that, and attach a new patch. (please do cvs diff -uw so
that white space changes don't show up.)
+ if(CheckForUnsentMessages())
offlineManager.goOnline(true, true, msgWindow);
+ else
+ offlineManager.goOnline(false, true, msgWindow);
break
could become:
+ offlineManager.goOnline(CheckForUnsentMsgs(), true, msgWindow);
while you do that (and finish testing) I'll continue reviewing.
Comment 21•23 years ago
|
||
+ please do cvs diff -uw so that white space changes don't show up.
whoops, ignore that comment.
Comment 22•23 years ago
|
||
# 79865 has the combined patch with these changes;
Whiteboard: [PDT+] requesting sr → [PDT+] #79865 has the combined patch
Comment 23•23 years ago
|
||
so you need a sr of bug #79865? that bug doesn't have a r= yet.
Comment 24•23 years ago
|
||
pushing out. 0.9.2 is done. (querying for this string will get you the list of
the 0.9.2 bugs I moved to 0.9.3)
Target Milestone: mozilla0.9.2 → mozilla0.9.3
Comment 25•23 years ago
|
||
Removing PDT+, marking nsbranch; should be checked into the 0.9.3 trunk ASAP,
tested & verified, then submitted for limbo builds.
Keywords: nsBranch
Whiteboard: [PDT+] #79865 has the combined patch → #79865 has the combined patch
Comment 26•23 years ago
|
||
Fix checked in on behalf on mohanb.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 27•23 years ago
|
||
Adding vtrunk; bugs need to be verified in the trunk for eventual limbo checkins.
Status: RESOLVED → ASSIGNED
Keywords: vtrunk
Comment 28•23 years ago
|
||
Clearing resolution, nsBranch bugs should be closed only after checkins into
limbo builds.
Resolution: FIXED → ---
Comment 29•23 years ago
|
||
Commercial builds
2001-07-05-09-trunk/ win nt 4.0
2001-07-05-08-trunk/ linux 2.2, red hat 7.0
2001-07-05-08-trunk/ mac os 9.0.4
There is still a problem. What's weird it is only a WINDOWS prob.
1.works fine if you initially start messenger click the offline icon.
Then click the icon again to go online as there is no message prompt
to send unsent messags.
Doesn't work for this case:
1. Go offline
2. compose a message and do send later
3. go online
4. prompt to send unsent messages apears, say send.
5. mesg is sent.
6. go offline
7. go back online
8. the unsent messages prompt pops up even though
there are no unsent messages in my unsent folder
Tried the same test case on mac and linux. no problem.
it only appears on windows. tried multiple new profiles
and I see this. The windows build has id of 2001070504
and using NT 4.0
Updated•23 years ago
|
Target Milestone: mozilla0.9.4 → mozilla0.9.5
Comment 31•23 years ago
|
||
Reassigning 0.9.4 Offline IMAP UI bugs to David; TFV 0.9.5.
Assignee: mohanb → bienvenu
Status: ASSIGNED → NEW
Comment 32•23 years ago
|
||
Jussi/David - Is this worthy of nsenterprise+ or nsbranch+. If not, please minus
this one.
Assignee | ||
Comment 33•23 years ago
|
||
I tried this - it worked fine. I think we need Gary to retest this.
Status: NEW → ASSIGNED
Comment 34•23 years ago
|
||
using commercial branch build 2001091203 on nt 4.0 and 2k
i still see this problem David. I did not check this on linux or mac.
After going offline, compsing a mesg, doing send later, going back
online, clicking send unsent mesg button on the window prompt,
then going back offline, then back online I still see the prompt
to send unsent mesgs.
Also a side note, my unsent messages folder is stiil showing
1 message though when I click on the folder, I don't see any messages
in that folder. This might be a outliner problem and possibly not
even related to this bug?
Assignee | ||
Comment 35•23 years ago
|
||
Are you sure the message gets sent? It seems like it might not be, which would
explain why we prompt again. I tried those exact same steps and it worked fine,
like I said. What's the name of your unsent messages folder? Is your sent folder
online or local?
Assignee | ||
Comment 36•23 years ago
|
||
my unsent messages folder still displays a count of 1 after it sends, so that is
an outliner problem, or more accurately, the send unsent messages code is not
updating the counts correctly. Do you select the unsent messages folder at some
point in this process, or are the steps as general and simple as you describe?
Comment 37•23 years ago
|
||
Ok. I'll try to answer your questions David.
First I'm using the commercial TRUNK build now
2001091203 on nt 4.0
I've tried migrated profiles and brand new profiles.
Using Modern theme.
-Yes my unsent messages do get sent before I click offline icon again.
in fact when I say yes to send unsent messages, I click the 'get mesg'
button to ensure I get the messages before going back offline.
-Name of my unsent messages folder is the default name: 'Unsent Messages'
and the folder is located under the "Local Folders" account.
-Yes I have selected the Unsent folders while I'm offline as I want
to see message 'dissapear' when i go back online. But I have tested
without ever clicking on the unsent messages folder and still see the
same problem
-My sent folder is set to the default online sent folder. I did try
switching sent folder to local folders and I still see the same
problem.
I've tried a test mail server, seth's mail server, my judge mail account
and i've seen it on all 3.
My steps to reproduce are really that simple (using a brand new profile)
1.create new profile
2. start browser
3.start messenger
4.set up imap mail account
5.login to your mail account.
6.go offline
7.compose mesg and do a send later.
8.go back online
9. say 'send unsent messages' at the prompt
10.login to your outgoing mail server
11.click get mesg
12.verify the mesg has arrived
13.go back offline (click offline icon in messenger)
14.go back online (click offline icon in messenger)
15.The send unsent messages prompt does indeed pop back up.
If I quit the application entirely and then restart browser and
messenger,login, and click icon to go offline,then back online, the message
prompt DOES NOT pop up.
So it pops up only after actually sending a usent mesg and then going
back online/offline/online/offline, etc..
Hope this helps and I am clear enough.
Assignee | ||
Comment 38•23 years ago
|
||
Comment 39•23 years ago
|
||
Comment on attachment 49166 [details] [diff] [review]
part of fix - default prefs should have escaped uri's
sr=mscott
Attachment #49166 -
Flags: superreview+
Comment 40•23 years ago
|
||
we'd like to take this low risk fix for the branch.
Comment 41•23 years ago
|
||
Comment on attachment 49166 [details] [diff] [review]
part of fix - default prefs should have escaped uri's
r=sspitzer
Attachment #49166 -
Flags: review+
Assignee | ||
Comment 42•23 years ago
|
||
fix checked into trunk - I'm not 100% sure this is the problem you're seeing,
Gary, but it's pretty likely.
Comment 43•23 years ago
|
||
PDT+ per PDT meeting today. Gary has signed off to do the QA on the branch.
Whiteboard: #79865 has the combined patch → #79865 has the combined patch, PDT+
Comment 44•23 years ago
|
||
David,
using commercial 2001-09-14-09-trunk on nt 4.0,
I am still seeing this problem.
Tried old profile/new profile, judge email account,
one of my tst mail accounts, and I see same problem.
Tried it on linux trunk build and no problem.
i'll try some other window platforms and see
if it's NT 4.0 specific?
Comment 45•23 years ago
|
||
MScott - Ready to check-in.
Comment 46•23 years ago
|
||
Using 2001-09-17-09-trunk/ on nt 4.0, win 2k (2 computers), win 98,
and win me, I think this is fixed.
I tried new profiles/existing profiles and it does look like it is fixed.
Once in a while, I can generate the problem and when that happens
if I go to Usent messages folder under Local Folder account and
right click and do a compact folder, it solves the problem. Number
of messages in Usent folder goes from 1 to 0.
I don't know if that lastlittle tidbit helps out or not.
Assignee | ||
Comment 47•23 years ago
|
||
fix checked into branch as well.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago → 23 years ago
Resolution: --- → FIXED
Comment 48•23 years ago
|
||
Using commercial branch builds (9.4)
20010925 nt 4.0, linux 2.2, mac 9.1
Verified that the 'send unsent mesgs' prompt does not appear
if your usent messages folder is empty. Tested both
migrated and new profiles.
Still need to verify on trunk.
Comment 49•23 years ago
|
||
commercial trunk
2001-10-08-09-trunk NT 4.0
2001-10-08-08-trunk linux 2.2
2001-10-08-08-trunk mac 9.1
Verified no prompt appears, if Unsent folder is empty, when
going from offline to online. Tried migrated/new profiles.
removed keyword vtrunk
marking as verified
Status: RESOLVED → VERIFIED
Keywords: vtrunk
Comment 50•23 years ago
|
||
this bug is still exist,when our qa team,test this bug,mozilla aways have one
unsend mail, although it was sended when mozilla online.but if i delete unsend
folder file under localfolder,then mozilla will ok!
Updated•20 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•