Bug 257151 - Try to reopen a unread draft mail fails with couldn't restore error msg.
Summary: Try to reopen a unread draft mail fails with couldn't restore error msg.
Status: RESOLVED UNMAINTAINED
Alias: None
Product: KMail Mobile
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Maemo 5 Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-17 15:05 UTC by Ludwig Reiter
Modified: 2018-09-04 20:08 UTC (History)
3 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 Ludwig Reiter 2010-11-17 15:05:44 UTC
Version:           unspecified (using Devel) 
OS:                Linux

version: 20101115.1197432-1maemo1.1197417

Try to open a saved to draft mail, which is unread. Failed with error msg
"Could not restore message".

Reproducible: Always

Steps to Reproduce:
1. Open composer.
2. Enter subject and text.
3. Save to draft.
4. Select the Local Folder>draft folder.
5. Doubleclick on the saved draft.

Actual Results:  
error msg.

Expected Results:  
This should open a composer with the draft.
Comment 1 Sabine Faure 2010-11-17 20:40:20 UTC
I can reproduce this bug today.

A pop up 'Restore Draft Error - Kmail Mobile' dialogue appears with the following message: 'Could not restore a draft' and an 'Ok' button.

However, after I click on its 'Ok' button and switch windows I can see that the draft was properly restored in a composer and sending it works fine.

So the error message should not be displayed at all since this works. Also the Composer with the restored draft should probably open in front of Kmail-mobile main window to show to the user that it's there.

N900, 4:4.6~20101117.1198109-1maemo1.1198084
Comment 2 Till Adam 2010-11-28 15:01:05 UTC
SVN commit 1201725 by tilladam:

Don't try to restores in threads when not in thread view.

CCBUG: 257151

 M  +2 -0      kmail-mobile.qml  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1201725
Comment 3 Ludwig Reiter 2010-12-02 13:14:51 UTC
tried again with version 20101202-1202744-1maemo1

I can still reproduce the "Could not restore a draft" error msg.
Comment 4 Sabine Faure 2010-12-03 23:16:07 UTC
I retested this today and I could not reproduce with only 1 unread email in the drafts folder however I could reproduce this bug with 2 unread email in the drafts folder by clicking on the most recent one of the two.

- write two emails that you save as draft
- Go to the Drafts folder (Local Folders) 
- The two emails appear as unread (in red)
- Click on the most recent one (the top one)

The 'Restore Draft Error' pop up dialogue appears.

N900, 4:4.6~20101203.1203110-1maemo1.1202581
Comment 5 Tobias Koenig 2010-12-23 16:43:22 UTC
commit 72053ce24face915e6829b64f9838c879072f1a2
branch master
Author: Tobias Koenig <tokoe@kde.org>
Date:   Thu Dec 23 16:44:58 2010 +0100

    Add debug output
    
    We need some more information why draft recovery fails on maemo,
    so print out the job error.
    
    CCBUG: 257151

diff --git a/mobile/mail/mainview.cpp b/mobile/mail/mainview.cpp
index 5a2d07c..b745472 100644
--- a/mobile/mail/mainview.cpp
+++ b/mobile/mail/mainview.cpp
@@ -569,7 +569,7 @@ void MainView::composeFetchResult( KJob *job )
 {
   const ItemFetchJob *fetchJob = qobject_cast<ItemFetchJob*>( job );
   if ( job->error() || fetchJob->items().isEmpty() ) {
-    kDebug() << "error!!";
+    kDebug() << "error:" << job->errorText();
     //###: review error string
     KMessageBox::sorry( this,
                         i18n( "Could not restore a draft." ),
Comment 6 Tobias Koenig 2010-12-28 09:35:53 UTC
Hej Sabine,

can you retest this issue please and attach the debug output here that starts with 'error:'?

Ciao,
Tobias
Comment 7 Andrew Crouthamel 2018-09-04 20:08:29 UTC
Hello! Sorry to be the bearer of bad news, but this project has been unmaintained for many years so I will be closing this bug.