LDIF Import cannot import 'kCategoryColumn'

NEW
Unassigned

Status

12 years ago
10 years ago

People

(Reporter: neandr, Unassigned)

Tracking

(Depends on: 2 bugs, {helpwanted})

Trunk
helpwanted
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1
Build Identifier: 

TB/AB Contacts exported with "LDIF output" will hold items like 'mozillaSpouse:thisIsASpouseName' or 'mozillaCategory:thisIsACategoryItem' in the generated LDIF file.

With Re-Importing such a LDIF-file using the normal LDIF-Import UI-function, those (and other?)items are 'lost'  --> empty fields. 

Reproducible: Always

Steps to Reproduce:
1.
2.
3.



This is an other example TB/AB has tremendous limitations and a move from Outlook to TB makes it hard form user willing to move any from Microsoft products!

Make Thunderbird successful ... solve ALSO the "small" limitations!!!
(Reporter)

Comment 1

12 years ago
see also bug 271976 
(Reporter)

Updated

11 years ago
Summary: LDIF Import of previous Exported Contact-Items failed → LDIF Import impossible because of 'kCategoryColumn' ... PR_FALSE
(Reporter)

Comment 2

11 years ago
Sorry, have posted some notes about this bug to another (358696)

Will repeat it here:

With the "Category" item I just noticed the normal LDIF import ignores an entry
 like: "mozillaCategory:gW"
That's because of:

http://mxr.mozilla.org/mozilla1.8.0/source/mailnews/addrbook/src/nsAddressBook.cpp#168
 168   {kCategoryColumn, MOZ_AB_LDIF_PREFIX "Category", PR_FALSE}, 

Can PR_FALSE changed to PR_TRUE to enable the LDIF import?
Firstly, LDIF import is not impossible just because it doesn't take the data from the category column - though perhaps you meant "LDIF import of kCategoryColumn is impossible".

Out of interest, how does outlook use the category column? Does it have multi-values (comma separated) or just one value?

(In reply to comment #2)
http://mxr.mozilla.org/mozilla1.8.0/source/mailnews/addrbook/src/nsAddressBook.cpp#168
>  168   {kCategoryColumn, MOZ_AB_LDIF_PREFIX "Category", PR_FALSE}, 
> Can PR_FALSE changed to PR_TRUE to enable the LDIF import?

No, because that table doesn't exist in that form any more. You're looking at old code to which we don't add new features. You should look at the *seamonkey* tree for the latest source code.

The current ldif import code is here: http://mxr.mozilla.org/seamonkey/source/mailnews/addrbook/src/nsAbLDIFService.cpp

I've got a feeling export of the category field may no longer work on trunk due to the fix for bug 119948 but I can't test that at the moment.

If it is the case that export is broken then we'd need to:

- Implement a new field for LDAP address books. I think this is as easy as adding the field to http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/mailnews/mailnews.js&rev=3.297&mark=302-339#302 and updating the alpha schema (http://wiki.mozilla.org/MailNews:Mozilla_LDAP_Address_Book_Schema)

- Update the nsAbLDIFService (link above) to allow import of the category column.

If someone provided some implementation for bug 364152 then that would probably involve largely fixing this bug as well.
Assignee: mscott → nobody
Severity: major → normal
Status: UNCONFIRMED → NEW
Component: Address Book → MailNews: Address Book
Depends on: 364152
Ever confirmed: true
Keywords: helpwanted
OS: Windows XP → All
Product: Thunderbird → Core
QA Contact: address-book → addressbook
Hardware: PC → All
Summary: LDIF Import impossible because of 'kCategoryColumn' ... PR_FALSE → LDIF Import cannot import 'kCategoryColumn'
Version: unspecified → Trunk
(Reporter)

Comment 4

11 years ago
(In reply to comment #3)
> Out of interest, how does outlook use the category column? Does it have
> multi-values (comma separated) or just one value?
OL uses multiple "Category"-item separated with semicolon, which is not RFC compliant. As simple replace to comma will fit.

> The current ldif import code is here:
> http://mxr.mozilla.org/seamonkey/source/mailnews/addrbook/src/nsAbLDIFService.cpp
>
At that code the "Category"-item is not supported (lines 432 .. 473)

Will try to have a look into the other mentioned points.
(In reply to comment #4)
> (In reply to comment #3)
> > Out of interest, how does outlook use the category column? Does it have
> > multi-values (comma separated) or just one value?
> OL uses multiple "Category"-item separated with semicolon, which is not RFC
> compliant. As simple replace to comma will fit.

We'd either have to check that on import, or not allow it, depends on what the RFC actually says (any idea which one?).
(Assignee)

Updated

10 years ago
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.