Closed Bug 1664359 Opened 4 years ago Closed 4 years ago

Simplify Mork address book import; don't rely on migration after restarting

Categories

(MailNews Core :: Import, defect)

defect

Tracking

(thunderbird_esr78 wontfix)

RESOLVED FIXED
83 Branch
Tracking Status
thunderbird_esr78 --- wontfix

People

(Reporter: darktrojan, Assigned: darktrojan)

References

Details

(Keywords: leave-open)

Attachments

(3 files)

The SeaMonkey import/migration code relies on the Mork address book migration code at start-up. This migration code no longer exists (as of bug 1660126).

In this bug I'm going to create a new importer just for Mork address books and also use it for SeaMonkey migration so that a restart is not required.

All of the code in mailnews/import/src/nsAddrDatabase.* previously existed at mailnews/addrbook/src,
and the algorithm for doing the import is a port of what was previously in mail/base/modules/MailMigrator.jsm.

assuming 78 unaffected

Attachment #9175091 - Attachment description: Bug 1664359 - Connect SeaMonkey migration code to Mork importer. r?mkmelin,rnons → Bug 1664359 - Connect SeaMonkey migration code to Mork importer. r?rnons

The UI knows nothing about the notification to reload the address book, as it's not really supposed to happen.
This patch adds another notification when the reload is complete, so that the UI can update itself.

Depends on D89853

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/2151acf05c6a
Create a Mork address book importer. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED

Gah! I wasn't intending to close the bug, or break the build, but I did both. Follow-up on the way.

Status: RESOLVED → REOPENED
Keywords: leave-open
Resolution: FIXED → ---
Target Milestone: --- → 83 Branch
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/0615e4479315
Stop using NS_IMETHODIMP on methods that return plain nsresult. rs=bustage-fix

Is it possible to (re-)import Mork address books in 78?

We have a lot of support requests in support forums, where users need to import additional *.mab files, which seems not to be possible at the moment.

There's no simple way but you can copy the .mab file to the profile, add some prefs like these, and restart:

ldap_2.servers.test.description=test migrated book
ldap_2.servers.test.dirType=2
ldap_2.servers.test.filename=abook-test.mab
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/0f7a013d7714
Connect SeaMonkey migration code to Mork importer. r=rnons
https://hg.mozilla.org/comm-central/rev/13b014ce8ffc
Refresh address book UI elements when the address book is force-reloaded. r=rnons
Status: REOPENED → RESOLVED
Closed: 4 years ago4 years ago
Resolution: --- → FIXED
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/339b21a873b7
followup - fix code fromatting. rs=clang-format

Should we uplift?

Hi Geoff, as you know, we've been looking into interoperability issues between Thunderbird and Outlook. Triggered by a tb-planning post, we've looked at import from Outlook which is mostly working (except for bug 1695441). We found the peculiar effect that Thunderbird restarts after importing an Outlook address book in version 78, but not in the current betas. We tracked it down to this change:
https://hg.mozilla.org/comm-central/rev/2151acf05c6acc3aa032db4322d5424b4a020dd1#l4.12
(there's also a comment above which should be adjusted).

Do you think it would be a good idea to backport this one line to version 78 to minimise the surprise? To the layman it could look like Thunderbird crashed.

Flags: needinfo?(geoff)

Yeah, alright. I'll make a patch. Bug 1695779.

Flags: needinfo?(geoff)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: