archive settings made for identities are not saved

RESOLVED FIXED in Thunderbird 24.0

Status

MailNews Core
Account Manager
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: freak-odo, Assigned: aceman)

Tracking

Thunderbird 24.0

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0
Build ID: 20130409194949

Steps to reproduce:

1. open account settings
2. go to "Manage Identities"
3. select second (non-default) identity
4. switch to "Copies & Folders" tab
5. enable message archive
6. confirm with ok

additional information:
- the default-identity of that account got archiving enabled and working
- no errors are logged


Actual results:

the settings didn't apply. it is not possible to archive messages send to that specific identity. reopening the settings confirmed that they were back to default values.


Expected results:

the settings should have stuck
(Reporter)

Updated

4 years ago
Summary: archive settings for second identity are not saved → archive settings made for identities are not saved
(Reporter)

Comment 1

4 years ago
edit: contrary to what I wrote before, it doesn't even matter which identity is selected, the settings are not saved for any identity
(Reporter)

Comment 2

4 years ago
here is a workaround:

1. open config-editor
2. search for "archive_enabled", you'll find the archive flags for all your identities in the form of mail.identity.id1.archive_enabled
3. enable archiving for the identities in question
4. if you need further configuration of the archive folders you can do it through the normal dialogues as explained in the first post, since the only thing not working in those dialogues is the enable/disable-flag

on a side note, this also suggest the bug is a fairly simple one, it seems the dialogue just ignores the enable-checkbox when saving the settings
(Assignee)

Comment 3

4 years ago
Confirming, I see exactly the same. Only the enabled/disable checkbox is not saved, the target folders are.
Assignee: nobody → acelists
Status: UNCONFIRMED → NEW
Component: Untriaged → Account Manager
Ever confirmed: true
Product: Thunderbird → MailNews Core
(Assignee)

Comment 4

4 years ago
Ok, the fix seems to be to add
  identity.archiveEnabled = document.getElementById('identity.archiveEnabled').checked;

to
function saveCopiesAndFolderSettings(identity)

in am-indentity-edit.js

I just wonder why it works for the default identity even without the fix.
Status: NEW → ASSIGNED
OS: Windows 7 → All
Hardware: x86_64 → All
(Reporter)

Comment 5

4 years ago
(In reply to :aceman from comment #4)
> I just wonder why it works for the default identity even without the fix.

It doesn't. If you try to edit the default identity through the identities dialogue, it doesn't work.
Or are you referring to the Copies&Folders Page directly in the account settings (not going through identities)? Do both pages share the same code?
(Assignee)

Comment 6

4 years ago
(In reply to freak-odo from comment #5)
> (In reply to :aceman from comment #4)
> > I just wonder why it works for the default identity even without the fix.
> 
> It doesn't. If you try to edit the default identity through the identities
> dialogue, it doesn't work.
True.

> Or are you referring to the Copies&Folders Page directly in the account
> settings (not going through identities)? Do both pages share the same code?

Yes, I meant this one. And they share some code, but not all.
(Assignee)

Comment 7

4 years ago
Created attachment 753344 [details] [diff] [review]
patch
Attachment #753344 - Flags: review?(iann_bugzilla)
(In reply to :aceman from comment #7)
> patch

FYI.

By patch, primary identity's archiveEnabled can be changed via "per identity Copies&Folders panel" in addition to "primary Copies&Folders panel", and ArchiveEnabled of no-primary identity can be modified.

However, in determiation of "Do Archive for an account or not" is perhaps determined by archiveEnabled flag of pimary identity(first identity) of an account(server).
> http://mxr.mozilla.org/comm-central/source/mailnews/imap/src/nsImapIncomingServer.cpp#1425
> 1425 NS_IMETHODIMP nsImapIncomingServer::DiscoveryDone()
> 1449     rv = accountMgr->GetFirstIdentityForServer(this, getter_AddRefs(identity));
> 1451     {
> 1469       bool archiveEnabled;
> 1470       identity->GetArchiveEnabled(&archiveEnabled);
This is why;
(1) Concept of Archive was initiallly "per account".
    To specifiy Archives Folder, Copies&Folder panel is used.
    => archiveEnabled is saved via main Copies&Folders panel. 
(2) Because Copies&Folders tab exists in "per identity setting",
    per "identity Archive settings" is posible.
    And, any Archive setting except archiveEnabled can be changed
    and saved normally via the "per identity setting panel".
(3) Although non first identity's archive setting(folder, granularity)
    is used via getIdentityForHeader(),
> http://mxr.mozilla.org/comm-central/source/mail/base/content/mailCommands.js#53
    as seen in bug 819392, when multiple mails are selected at thread
    pane, "archive setting for MsgDBHdr of currently seleced mail in
    selected multiple mails" is applied to all selected mails.
    This is perhaps because Archive setting was "per account thing",
    even though it's set via Copies&Folders panel which is for
    "per identity setting".
 
Above issue is different issue from this bug, and above issue is irrelevant to this bug.
However, if different archiveEnabled can be set by this patch, following Tb's bug(for general user) will be surely generated.
  Even though Archive is disabled for third identity,
  mail to third ientity is still archived.
I think "Graying out Enable/Diable Archive check box at per identity Copes&Folders panel" is safer, untill "Archive is per identity thing" will be achived well in entire Thunderbird.

Updated

4 years ago
Attachment #753344 - Flags: review?(iann_bugzilla) → review+
(Assignee)

Updated

4 years ago
Keywords: checkin-needed
https://hg.mozilla.org/comm-central/rev/0adefea2d5bd
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 24.0
You need to log in before you can comment on or make changes to this bug.