Closed Bug 531829 Opened 15 years ago Closed 15 years ago

Archiving messages from multiple years stores them all in one year's archive

Categories

(Thunderbird :: Folder and Message Lists, defect)

defect
Not set
normal

Tracking

(blocking-thunderbird3.0 .1+, thunderbird3.0 .1-fixed)

VERIFIED FIXED
Thunderbird 3.1a1
Tracking Status
blocking-thunderbird3.0 --- .1+
thunderbird3.0 --- .1-fixed

People

(Reporter: pufiad, Assigned: Bienvenu)

References

Details

Attachments

(1 file, 2 obsolete files)

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091109 Ubuntu/9.10 (karmic) Firefox/3.5.5 Build Identifier: Gecko/20091121 Thunderbird/3.0 RC1 When selecting messages from multiple years, for example 2006, 2007 and 2008 and then clicking the archive button, Thunderbird stores them all in the archive folder for 2006. It should store each message in its year's archive folder. Reproducible: Always Workaround: undo and select and archive per year.
Anything when you reproduce in tool-> Error console ? Does this also happens in safe-mode (http://kb.mozillazine.org/Safe_mode) ?
Component: General → Folder and Message Lists
QA Contact: general → folders-message-lists
Yes, it also happens in safe mode and there is no other message in the activity log, except for "moved 2 messages to 2006". I presume it takes the year of the first message and stores all selected messages in that year's archive. If the folder is sorted chronologically then it stores the messages in the first year's archive (2006). If it is sorted in reverse, then it stores them in the last year's archive (2008), which is the one that is shown first.
BTW: nothing in the error log.
Is your email account pop, imap ? are you using gmail by any chance ?
Ludovic, am I correct that you cannot reproduce this bug? I see this for two different users with two different profiles. So I guess it is a common bug. To answer your question: I only tried it on Local Folders, although five of them.
Checked with next build. > Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091129 Shredder/3.0.1pre [Steps to reproduce] 1. Create dummy POP3 account, set archive folder to this account's "Archive". 2. Prepare two mails: mail-1=1970/aa/bb, mail-2=2009/xx/yy 3. Create two mail folders, F1 and F2, Show "Order Received" column, sort by ascending order 4. Copy mail-1, mail-2 to F1 in this order Copy mail-2, mail-1 to F2 in this order 5. Select all, archive at F1 (ordered in mail-1, mail-2) => archived to 1970 6. Select all, archive at F2 (ordered in mail-2, mail-1) => archived to 2009 Archive looks to check Date: of first mail only. => Confirmed (already reported issue?)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Confirmed with RC2. As Ben stated, it archives according to the first message in the selection.
Bug 489164 is request for "archive of multiple mail" and was implemented by Bug 480470. Setting dependency of Bug 480470.
Blocks: 480470
Version: unspecified → 3.0
This happened to me with final version 3.0. I archived > 10k e-mails in a number of accounts and had to realize that most of them have been moved to folder imap://username@servername/Archives/2009. Is it safe to move messages from years < 2009 to their corresponding folders, like imap://username@servername/Archives/2008, manually?
(In reply to comment #9) > This happened to me with final version 3.0. I archived > 10k e-mails in a > number of accounts and had to realize that most of them have been moved to > folder imap://username@servername/Archives/2009. > > Is it safe to move messages from years < 2009 to their corresponding folders, > like imap://username@servername/Archives/2008, manually? I too have this issue in the final 3.0 release. All is not lost once this happens. You can go into your 2009 archive folder, for example, and hit archive on items that should not be there, they will move to the correct folder. If you hit archive on a 2009 item, nothing bad seems to happen.
blocking-thunderbird3.0: --- → ?
This happens for me as well. I used the same workaround as insider32 to move the messages into their correct folders. Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0
I'm also experiencing the problem and used the solution insider32 mentioned but I noticed that for already archived mail, there's no "Archive" Button in the toolbar. Pressing "A" or selecting "Message -> Archive" works but this does not seem consistent to me.
Same problem here with IMAP account, same solution as others said.
Attached patch proposed fix (obsolete) — Splinter Review
this fixes it. This needs a mozmill test.
Assignee: nobody → bienvenu
Status: NEW → ASSIGNED
this should go into 3.01
blocking-thunderbird3.0: ? → .1+
Flags: in-testsuite?
Attached patch fix with mozmill test (obsolete) — Splinter Review
since this is 99% mozmill test, I thought sid would be a good person to look at this.
Attachment #417258 - Attachment is obsolete: true
Attachment #417623 - Flags: review?(sid.bugzilla)
Whiteboard: [has patch for review sid0]
Comment on attachment 417623 [details] [diff] [review] fix with mozmill test >diff --git a/mail/base/content/mailWindowOverlay.js b/mail/base/content/mailWindowOverlay.js > > let copyBatchKey = msgHdr.folder.URI + '\000'; > if (granularity >= Components.interfaces.nsIMsgIncomingServer >+ .perYearArchiveFolders) >+ copyBatchKey += msgYear; >+ if (granularity >= Components.interfaces.nsIMsgIncomingServer > .perMonthArchiveFolders) Could you please fix the spacing around the >= signs? >+ >+var setupModule = function(module) { >+ let fdh = collector.getModule('folder-display-helpers'); >+ fdh.installInto(module); >+ >+ archiveSrcFolder = create_folder("archiveSrc"); We've been using capitalised first letters, so "ArchiveSrc" would be nice. >+ // local archiving is pretty close to synchronous, but let's wait a bit. >+ mc.sleep(1000); I'm wondering if we could spin and wait for some state here instead -- say that the number of messages in the view has decreased by 2. Also, this seems like this, along with the mc.keypress, should live in test-folder-display-helpers.js as archive_selected_messages or something. >+ be_in_folder(firstArchiveFolder); >+ assert_true(mc.folderDisplay.view.dbView.getMsgHdrAt(0).messageId == firstMsgHdrMsgId, >+ "message should be archived correctly"); This is slightly different from the exception messages we've been throwing so far -- could you change it to something like "Message should have been archived to folder foo, but it isn't present there"?
Attachment #417623 - Flags: review?(sid.bugzilla) → review-
Whiteboard: [has patch for review sid0] → [needs revised patch bienvenu]
Sigh, I updated my repo, and now the test is completely broken, so I don't really have an ETA for getting a new patch up. I hope I can figure out the mozmill stuff before I go on vacation :-(
Attachment #417623 - Attachment is obsolete: true
Attachment #418197 - Flags: review?(sid.bugzilla)
Comment on attachment 418197 [details] [diff] [review] fix addressing comments >- if (granularity >= Components.interfaces.nsIMsgIncomingServer >+ if (granularity >= Components.interfaces.nsIMsgIncomingServer >+ .perYearArchiveFolders) >+ copyBatchKey += msgYear; >+ if (granularity >= Components.interfaces.nsIMsgIncomingServer > .perMonthArchiveFolders) Nit: please align the dots. >+ assert_true(mc.dbView.getMsgHdrAt(0).messageId == firstMsgHdrMsgId, >+ "Message should have been archived to Local Folders/Archives/" + firstMsgYear + ", but isn't present there"); Uber-nit: could you please insert an |it| for uniformity with the other error messages. >+ // Wait for the view rowCount to decrease by the number of selected messages. >+ let messagesDeletedFromView = function() { >+ return aController.dbView.rowCount == expectedCount; >+ }; >+ controller.waitForEval('subject()', >+ NORMAL_TIMEOUT, >+ FAST_INTERVAL, messagesDeletedFromView); Thanks, this works nicely. >+ // the above may return immediately, meaning the event queue might not get a >+ // chance. give it a chance now. >+ aController.sleep(0); >+ >+} Nit: blank line.
Attachment #418197 - Flags: review?(sid.bugzilla) → review+
Whiteboard: [needs revised patch bienvenu] → [needs landing]
For some reason, running the full folder-display suite causes these tests to fail with a message saying "mc.dbView is null" at the assert_true lines.
The problem seems to be that the keypress isn't registering. This seems to be the same problem as <http://mxr.mozilla.org/comm-central/source/mail/test/mozmill/folder-display/test-deletion-with-multiple-displays.js#183> -- and the same hack works.
I can add that, thx. Weird that running the full folder display suite is different from running individual tests. I also rather thought that your fix for the fake tree box element fixed the delete focus issue on the trunk, at least as a user.
yeah, no clue what's going on there. I can't reproduce manually either, so I suspect it's an issue with mozmill.
fixed on trunk.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3.1a1
Comment on attachment 418197 [details] [diff] [review] fix addressing comments the actual fix is just a couple lines; the patch is mostly mozmill test.
Attachment #418197 - Flags: approval-thunderbird3.0.1?
Attachment #418197 - Flags: approval-thunderbird3.0.1? → approval-thunderbird3.0.1+
Whiteboard: [needs landing]
Flags: in-testsuite? → in-testsuite+
thx for landing this on the branch, Standard8.
V. Fixed Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.7) Gecko/20100107 Shredder/3.0.1pre
Status: RESOLVED → VERIFIED
Just tested on Shredder 3.0.2pre: I have tried to archive messages from 2007 to today. All messages were stored on the same IMAP folder. Messages received on 2007 were correctly archived on "Archives/2007" but all other messages (from 1/1/2008 to today) disappears from original folder and also weren't archived. Fortunately weren't delete from the IMAP folder so I simply delete the .msf index to get back my email.
(In reply to comment #32) > Just tested on Shredder 3.0.2pre: > Messages received on 2007 were correctly archived on "Archives/2007" but all > other messages (from 1/1/2008 to today) disappears from original folder and > also weren't archived. As written in comment #30, this bug is already VERIFIED with Tb 3.0.1Pre. Can you open separate bug with attaching(not paste) IMAP log for your problem with Tb 3.0.2Pre? > https://wiki.mozilla.org/MailNews:Logging Screen shots for "but all other messages disappears from original folder and also weren't archived" is needed in addition to IMAP log.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: