After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 653631 - Empty trash doesn't work
Empty trash doesn't work
Status: RESOLVED FIXED
Product: evolution-ews
Classification: Other
Component: Mail
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: Evolution EWS maintainer(s)
Evolution EWS maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2011-06-29 10:32 UTC by Akhil Laddha
Modified: 2012-04-26 06:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ews patch (2.62 KB, patch)
2012-04-24 09:51 UTC, Milan Crha
committed Details | Review
ews patch ][ (3.19 KB, patch)
2012-04-26 06:42 UTC, Milan Crha
committed Details | Review

Description Akhil Laddha 2011-06-29 10:32:07 UTC
Right click on trash -> empty trash, it doesn't delete emails which are in trash folder.

Expected : It should delete all the mails which are in trash.
Comment 1 Pavel Ocheretny 2011-08-21 13:16:57 UTC
Trash is a view (not folder) of messaged that was marked for deletion from other folders.

EWS do not have Trash view, instead we have a Deleted items folder (real folder) on the server. Therefore mails that you see in Deleted items are *really* mails. 

When you press on "empty trash" the Evolution scan all folders under that account and expunge messaged that was marked for deletion. 

We have to disable this option in GUI somehow, need to ask Chen about
Comment 2 Milan Crha 2012-04-24 09:51:23 UTC
Created attachment 212670 [details] [review]
ews patch

for evolution-ews;

This checks whether deleting messages in Deleted Items or elsewhere, and if it's in Deleted Items, then it asks for hard delete. It makes work the Empty Trash too.
Comment 3 Milan Crha 2012-04-24 09:54:12 UTC
Created commit b716404 in ews master (3.5.1+)
Created commit e2e4836 in ews gnome-3-4 (3.4.2+)
Comment 4 Milan Crha 2012-04-24 10:33:50 UTC
Here is built a test package for Fedora (17), which contains patch for this bug and for bug #664637:
http://koji.fedoraproject.org/koji/taskinfo?taskID=4017904
Comment 5 Peter Robinson 2012-04-24 15:44:38 UTC
Doesn't appear to work for me
Comment 6 Mikhail 2012-04-25 06:29:56 UTC
Now actually removes the deleted messages.
I join to question 'How force a sync?'.
Now I have on server in the folder 'deleted messages' much letters which are no longer in evolution. How to see them in evolution? And then remove through evolution?
Comment 7 Milan Crha 2012-04-25 07:12:37 UTC
(In reply to comment #5)
> Doesn't appear to work for me

Hmm, does the Deleted Items folder have an icon of a Trash? That's how the trash is recognized within the patch. Either File->Empty Trash, or right-click on the Deleted Items folder and choosing Empty Trash, will delete all messages from that folder, regardless of their 'deleted' state in evolution (messages within Trash folder are all considered deleted).

(In reply to comment #6)
> Now actually removes the deleted messages.
> I join to question 'How force a sync?'.

a) close evolution
b) remove folder ~/.cache/evolution/mail/<ews-account-uid>/
c) run evolution, which will reload all account information from the server
   from scratch, together with information about all messages stored on
   the server - that way you might get exactly the same view in evolution
   and in Exchange's web interface.
Comment 8 Peter Robinson 2012-04-25 09:10:22 UTC
(In reply to comment #7)
> (In reply to comment #5)
> > Doesn't appear to work for me
> 
> Hmm, does the Deleted Items folder have an icon of a Trash? That's how the
> trash is recognized within the patch. Either File->Empty Trash, or right-click
> on the Deleted Items folder and choosing Empty Trash, will delete all messages
> from that folder, regardless of their 'deleted' state in evolution (messages
> within Trash folder are all considered deleted).

It has a picture of a bin. If I right click on it I get a message "Empty Wastebasket" (en.UK locale) and I get the same option in the file menu but neither seem to have any effect.

> (In reply to comment #6)
> > Now actually removes the deleted messages.
> > I join to question 'How force a sync?'.
> 
> a) close evolution
> b) remove folder ~/.cache/evolution/mail/<ews-account-uid>/
> c) run evolution, which will reload all account information from the server
>    from scratch, together with information about all messages stored on
>    the server - that way you might get exactly the same view in evolution
>    and in Exchange's web interface.
Comment 9 Peter Robinson 2012-04-25 09:13:33 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > (In reply to comment #5)
> > > Doesn't appear to work for me
> > 
> > Hmm, does the Deleted Items folder have an icon of a Trash? That's how the
> > trash is recognized within the patch. Either File->Empty Trash, or right-click
> > on the Deleted Items folder and choosing Empty Trash, will delete all messages
> > from that folder, regardless of their 'deleted' state in evolution (messages
> > within Trash folder are all considered deleted).
> 
> It has a picture of a bin. If I right click on it I get a message "Empty
> Wastebasket" (en.UK locale) and I get the same option in the file menu but
> neither seem to have any effect.

Actually I lie. Right clicking on it has worked, it refreshed the folder first which took ages and then once it had done that it's now deleting them, it's taking a while though as there was about 4K messages there. I'll try the menu option again when it's finished.
Comment 10 Milan Crha 2012-04-25 11:25:27 UTC
(In reply to comment #9)
> Actually I lie. Right clicking on it has worked

Good... I mean... you know... :) I was thinking what could be wrong with this, when the patch change is pretty straightforward, thus it's not giving much space for an error. If it works for you, then good. (I guess the folder wasn't read from the server yet, seemed like empty, and thus the trash emptying was "quick" with nothing actually removed, because ews didn't know about any messages in the folder. Just a guess, when you mentioned long synchronization.
Comment 11 Peter Robinson 2012-04-25 12:08:21 UTC
> read from the server yet, seemed like empty, and thus the trash emptying was
> "quick" with nothing actually removed, because ews didn't know about any
> messages in the folder. Just a guess, when you mentioned long synchronization.

It definitely wasn't empty!

There seems to be different actions for the right click vs File menu options.

When in the Inbox if I select File -> Empty Wastebasket I get:

"Are you sure you want to permanently remove all the deleted messages in all folders? If you continue, you will not be able to recover these messages."
"Cancel" "Empty Wastebasket"

Nothing happens.

If I click into the "Deleted Items" wastebasket folder, right click and select "Empty Wastebasket" I get:

"Are you sure you want to permanently remove all the deleted messages in folder "username@domain:Deleted Items"?  If you continue, you will not be able to recover these messages."
"Cancel" "Expunge"

The last option works, the first option doesn't
Comment 12 Milan Crha 2012-04-25 18:50:09 UTC
Oh, I see the problem. I'm reopening this. Thanks for the clarification.
Comment 13 Milan Crha 2012-04-26 06:42:05 UTC
Created attachment 212852 [details] [review]
ews patch ][

for evolution-ews;

The method which is supposed to return a Trash folder returned always NULL in ews, thus the File->Empty Trash didn't know which folder is trash and skipped the account from the procedure. I didn't look carefully while writing the first patch, otherwise it would be done together. I'm sorry for that.
Comment 14 Milan Crha 2012-04-26 06:45:28 UTC
Created commit e5810c6 in ews master (3.5.1+)
Created commit 2577521 in ews gnome-3-4 (3.4.2+)