Closed Bug 811339 Opened 12 years ago Closed 10 years ago

Multiple copies of drafts saved while offline on IMAP accounts

Categories

(MailNews Core :: Networking: IMAP, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 638358

People

(Reporter: it, Unassigned)

References

(Blocks 2 open bugs)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0
Build ID: 20120417165043

Steps to reproduce:

1. Work offline by clicking the offline-icon on the lower left-hand corner
2. Save a draft message multiple times: find a number of copies in the drafts folder
4. Re-establish connection by clicking again on the icon
5. Watch as your messages disappear from the drafts folder


Actual results:

While offline, multiple copies of the draft appear in the Drafts folder
(ok, they disappear when getting online again).


Expected results:

Only the latest version of the draft should appear in the Drafts folder,
that is, any existing earlier version should be replaced.
Bug occurs at least on Linux and Mac. 
I set the severity to "minor".
See also bug 475101 and bug 11387 (I was not able to put this info in the ("See Also: Add Bug URLs:" field).
Severity: normal → minor
OS: Linux → All
Hardware: x86_64 → All
Component: Untriaged → Networking: IMAP
Product: Thunderbird → MailNews Core
same problem as bug 805626?
> Bug summary : Multiple copies of drafts saved while offline on IMAP accounts

For this phenomenon. Sam as bug 638358?
@WADA, this bug is related to bug 805626, but there the focus is on data loss when getting online, while the issue reported here is the fact that superfluous draft exist while offline.
This bug is also related to bug 638358, but what I observed here is that the superfluous draft messages are (correctly) deleted when going online.
Blocks: tb-drafts
Blocks: 678947
(In reply to David von Oheimb from comment #0)
> Steps to reproduce:
> 1. Work offline by clicking the offline-icon on the lower left-hand corner
> 2. Save a draft message multiple times: find a number of copies in the drafts folder

This part is obviously dup of Bug 638358. 
See Bug 1108441 Comment #4 for "what happens".

> 4. Re-establish connection by clicking again on the icon
> 5. Watch as your messages disappear from the drafts folder

After closing bug 475101, as seen in Bug 1108441 Comment #4, I can't see such phenoenon.
Problem is always "old draft is not deleted when going back to Work Online mode".

I mainly checked with Drafts folder of Offline-use=On. So I checked with Offline-Use=Off using Thunderbird 31.3.0.
Phenomenon was same as Bug 1108441 Comment #4. I couldn't see phenomenon you reported.
   1. Drafts=Offline-Ose=Off. Initial UID=1. Subject=1. Edit draft of UID=1.
   2. Go Work Offline.
   3. Change to Subject-2, Save
       => UID-1 is deleted, UID=FakedKey is created. Sunject-2 of FakedKey is saved in Drafts file(Offline-Store file).
   4. Repeat Change Subject(ncrease number in Subject) and Save, until Subject-5.
       => UID=FakedKey is created. Sunject-N of FakedKey is saved in Drafts file(Offline-Store file) upon each save.
   5. Go back to Work Online mode
       => UIDs of FakedKey disappears, then UID=2 to 5 aappears with reverted Subject order.
             Subject-5  Subject-4  Subject-3 Subject-2
             UID=2       UID=3       UID=4       UID=5
   6. Go Work Offline mode
       Content of draft mails is not shown because data of message is not held in Offline-Store file due to Offlie-Use=Off folder.
             UID=2       UID=3       UID=4       UID=5

Do you still see your problem, "deleted by go back to Work Online", in recent Thunderbird releases?
If so, can you consistently reproduce your problem?
Drafts of Offline-use=Off, or auto-sync=disabled case?
(In reply to David von Oheimb from comment #4)
> @WADA, this bug is related to bug 805626, but there the focus is on data loss when getting online, 
> while the issue reported here is the fact that superfluous draft exist while offline.

If so, can we close as DUP of bug 638358?

> This bug is also related to bug 638358, but what I observed here is that
> the superfluous draft messages are (correctly) deleted when going online.

Following in your comment #0 is "the superfluous draft messages are (correctly) deleted when going online"?
> 4. Re-establish connection by clicking again on the icon
> 5. Watch as your messages disappear from the drafts folder

If so, phenomenon of "duplicated/not-deleted draftwhile work offline  is not deleted by go back work online" which I saw maybe is one of following.
  (a) Simply a regression.
  (b) Problem like next was resolved, so "delete of old draft upon going back online" is not executed.
        If copy/move/delete is repeated on a mail while Work Offline mode,
        wrong mail at wrong folder is deleted or copy is not executed upon going back to online.
Difference may be following.
(a) UID of draft at server=N -> Save while offline m times -> go work online -> save -> UID=(N+1) for newest draft
      -> messageSend=2 by save opertion
      -> UID=(N+2) to UID=(N+m) for old draft mails in reversed generation of draft by re-sync
      and "delete draftID and copy messageSend(N+1) to draftID" is executed at same time.
      In this case, if m=a few, "old draft" may be fortunately deleted.
(b) UID of draft at server=N -> Save while offline m times -> go work online -> re-open Drafts manually
      -> UID=(N+1) to UID=(N+m-1) for old draft mails in reversed generation of draft by re-sync
      -> save -> UID=(N+m) for newest draft -> messageSend]=N+m
      In this case, "non-deleted draft while offline" won't be deleted upon going back to work online..
I always checed with (b).
Anyway, closing as dup of Bug 638358.
If not dup, please re-open.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Thanks for asking if I agree to mark this as duplicate of bug 638358. 
You gave too little time to answer before you actually marking it as duplicate, yet I agree although the description I gave here is much more concise and thus easier to understand than for that bug report.

BTW, meanwhile (at least with TB 31.3.0) the superfluous copies in the IMAP Drafts folder are (in comparison to earlier, when I reported this bug) not anymore removed after going online; they are just saved online and re-fetched from the server. So meanwhile the contents of bug 638358 now fully apply.
You need to log in before you can comment on or make changes to this bug.