Bug 271913 - KMail 2 succeeds in migrating data, but old folders are initially empty
Summary: KMail 2 succeeds in migrating data, but old folders are initially empty
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: folders (show other bugs)
Version: 2.0.95
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 272099 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-04-28 11:14 UTC by JK
Modified: 2011-11-17 22:01 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description JK 2011-04-28 11:14:09 UTC
Version:           2.0.95 (using KDE 4.6.2) 
OS:                Linux

The previous custom folder hierarchy from KMail 1 was preserved in the KMail 2 migration, but only the Inbox folder displayed its old content. The rest of the folders were all empty. All old mail was still present in ~/.kde4/share/apps/kmail/mail/. 

Running "Folder->Update folder and its subfolders" on all old folders successfully synced things and the mail displayed correctly thereafter.

The migrator should do this automatically, or at least specify that the user needs to update their folders to view their old mail.

Reproducible: Didn't try

Steps to Reproduce:
- Migrate from KMail 1 with many custom folders, each containing email.
- Confirm whether folders are empty after migration.
- Confirm whether "Folder->Update folder and its subfolders" syncs successfully.


Expected Results:  
- Migration preserves folders, but they are empty
- After running "Folder->Update folder and its subfolders" mail is displayed.

OS: Linux (x86_64) release 2.6.38-gentoo-r1
Compiler: x86_64-pc-linux-gnu-gcc
Comment 1 Andre Woebbeking 2011-05-10 21:20:32 UTC
I can confirm this for my local folders. Online IMAP folders work well.
Comment 2 Andre Woebbeking 2011-05-10 21:33:07 UTC
*** Bug 272099 has been marked as a duplicate of this bug. ***
Comment 3 Leon Maurer 2011-05-10 22:37:10 UTC
(I previously posted this on Bug 272099.)

I've found a strange fix:

You can see in my earlier attachment that KMail shows zero messages in the
trash. However, when I moved a message to the trash, all of a sudden I could
see the other messages that had been in the trash but weren't previously
visible.

I can do the same with the other folders; after I move a message in to them,
the previously invisible messages become visible.
Comment 4 S. Burmeister 2011-06-29 21:07:29 UTC
maybe dup of https://bugs.kde.org/show_bug.cgi?id=268040
Comment 5 Kevin Krammer 2011-06-30 18:35:24 UTC
(In reply to comment #4)
> maybe dup of https://bugs.kde.org/show_bug.cgi?id=268040

Only partially, the folders which you could sync successfully have the same problem described here, but the others (like the one with the debug output in first comment) have a different one.

Thanks for the suggestion though
Comment 6 Stephen Kelly 2011-07-04 14:52:44 UTC
Git commit 09d52e45006d36f82e5dda7bc7dc2f7e0e7a4f3c by Stephen Kelly, on behalf of Kevin Krammer.
Committed on 04/07/2011 at 16:42.
Pushed by skelly into branch 'master'.

Make ETM fetch empty collections at least once

When collections are empty because they have just been created
(synchronizeCollectionTree or equivalent operation), an application
using EntityTreeModel will not fetch their contents, assuming they
are truly empty (contain no items). This is done for optimization
purposes.

This patch make ETM only skip collections which are known to be
empty. We can't just check the statistics for the optimization
because the statistics will report zero until something is requested
if the resource simply has not been sync'd yet.

BUG: 271913
REVIEW: 101844

M  +13   -1    akonadi/entitytreemodel_p.cpp     
M  +1    -0    akonadi/entitytreemodel_p.h     

http://commits.kde.org/kdepimlibs/09d52e45006d36f82e5dda7bc7dc2f7e0e7a4f3c