linagora / openpaas-esn

Open PaaS Enterprise Social Network
http://open-paas.org
Other
478 stars 148 forks source link

OpenPaaS v1.4.0: Import Contacts from file #59

Closed alexcustos closed 3 years ago

alexcustos commented 5 years ago

I had the issue with the previous version, but I mixed v1.3.x core with v1.4.0-beta Contact and DAV modules. Now everything is from 1.4.0 branch, so decided to create a ticket.

Everything seems to be going well, but nothing appears in Contacts. I tried to import into different books and simplified Thunderbird's dump (addresses.vcf) to just one email address, but I saw no record in Sabre's log that related to this action, and there were no errors in other log files too. CardDav URL is working perfectly with CardBook extension, so syncing over DAV no issue itself.

Here's a record from Complete section of Job Queue: https://mail.example.com/jobqueue/ui

linagora.esn.dav.import:import-request
Import DAV items from file "addresses.vcf" (ID: 5c7b6d8061d3fd001b09dc80)
State:  complete
Attempts:   1/1
Duration:   less than one second
Created:    58 seconds ago
Completed:  58 seconds ago
requestId:  5c7b6d8061d3fd001b09dc82
title:  Import DAV items from file "addresses.vcf" (ID: 5c7b6d8061d3fd001b09dc80)
tuanlc commented 5 years ago

Hello @alexcustos I tested with v1.4.0 and import contacts works for me.

Can you confirm that your addresses.vcf file contains at least 1 contact? Because there is no log at Sabre side so I guess there is no contact in your file. Thanks,

alexcustos commented 5 years ago

Hello @tuanlc, Yes, Here is that file content. I also tried to import more complex and simple records, but it's main test file. Could you please confirm that it's expected file format, then I'll try to debug the issue on my side.

begin:vcard
email;internet:customerhelp@ebay.com
version:2.1
end:vcard

begin:vcard
email;internet:alexcustos@example.com
version:2.1
end:vcard

begin:vcard
email;internet:admin@example.com
version:2.1
end:vcard
tuanlc commented 5 years ago

Hi @alexcustos ,

Yes, the issue can come from the version of vCard. I'm checking if the import feature supports version 2.1. For me, it works with vCard v3.0 or v4.0.

With v4.0, the format is:

BEGIN:VCARD
VERSION:4.0
UID:cd42c2e0-5218-42e9-8359-67a68b0a0b3c
FN:abc
N:;abc;;;
EMAIL;TYPE=Work:mailto:abc@open-paas.org
END:VCARD
BEGIN:VCARD
VERSION:4.0
FN:abcd123456
N:;abcd123456;;;
UID:94df5fb0-5f44-49d1-bd88-1644c482d31f
END:VCARD

I'm finding some official document.

alexcustos commented 5 years ago

@tuanlc Thank you! Your example is working well for me too.

tuanlc commented 5 years ago

@alexcustos Sabre only supports vCard v3.0 and v4.0, check more here Standards support

vCard v2.1 is in Non standards support part.

alexcustos commented 5 years ago

@tuanlc Yes, I also realized that it's a common issue that Thunderbird allows export to version 2.1only, but that type is not widely used anymore.