Bug 66038 - label conflict
Summary: label conflict
Status: RESOLVED MOVED
Alias: None
Product: SyncEvolution
Classification: Unclassified
Component: KDE (show other bugs)
Version: 1.3.99.3
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: SyncEvolution Community
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-22 09:33 UTC by promeneur
Modified: 2018-10-13 12:39 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
labels seen in kaddressbook editor (72.68 KB, image/png)
2013-06-23 05:29 UTC, promeneur
Details
labels seen in kaddressbook view (80.66 KB, image/png)
2013-06-23 05:31 UTC, promeneur
Details
labels seen in vcard file (90.17 KB, image/png)
2013-06-23 05:45 UTC, promeneur
Details
android contact editor (63.65 KB, image/png)
2013-06-23 07:18 UTC, promeneur
Details
android contact view (64.66 KB, image/png)
2013-06-23 07:19 UTC, promeneur
Details
the vcard after synchronizing from android (97.99 KB, image/png)
2013-06-23 07:35 UTC, promeneur
Details
view of "TEST" card in kaddressbook after sync from android (84.98 KB, image/png)
2013-06-23 07:37 UTC, promeneur
Details

Description promeneur 2013-06-22 09:33:27 UTC
1. first pb

kde label for a personal fax         : <no label>
kde label for a professional fax     : <no label>
kde label for a fax                  : fax

android label for a personal fax     : fax personnel
android label for a professional fax : fax professionnel
android label for a fax              : <no label>

when i synchronize from kde to android
then
all kde card with "fax" "<number>" are changed to "<no label>" "<number>"
then
i must manualy change "<no label>" to <fax personnel" or "fax professionnel"

this is a big pb when you have many fax

note : i say "android" but i don't know if it is "samsung" or "android" or google label.



2. second pb

if in android i change in a card "<no label>" "<number>" to "fax personnel" "<number>" or "fax professionnel"
then
i synchronize from android to kde
then
in kde "fax" "<number>" is changed to "fax personnel" "<number>" or "fax professionnel"

this is a problem for app accessing to kde addressbook and expecting kde label
"fax" and not "fax personnel" "<number>" or "fax professionnel"

3 there is the same pb for telephone

kde personal phone     : "téléphone personnel"
kde professional phone : "téléphone professionnel"

android personal phone     : "téléphone personnel/boîte vocale"
android professional phone : "téléphone professionnel/boîte vocale"

4 there is perhaps some pb for other fields

5. perhaps also funambol has their own labels

then
labels may changed between funambol and kde !
Comment 1 Patrick Ohly 2013-06-22 19:55:03 UTC
(In reply to comment #0)
> 1. first pb
> 
> kde label for a personal fax         : <no label>
> kde label for a professional fax     : <no label>
> kde label for a fax                  : fax
> 
> android label for a personal fax     : fax personnel
> android label for a professional fax : fax professionnel
> android label for a fax              : <no label>
> 
> when i synchronize from kde to android
> then
> all kde card with "fax" "<number>" are changed to "<no label>" "<number>"
> then
> i must manualy change "<no label>" to <fax personnel" or "fax professionnel"
> 
> this is a big pb when you have many fax
> 
> note : i say "android" but i don't know if it is "samsung" or "android" or
> google label.

When you say "label", do you mean the TYPE in the TEL property of the vCard? It would help to quote examples from the output of "syncevolution --export - @default addressbook". This also applies to the other problems.

If I understand the description correctly, then KDE does not mark personal or professional fax as "fax" at all - how can SyncEvolution then determine that the phone number is a fax?

It is possible to change the flags when syncing, but it must be possible to define the precise steps that achieve the desired result.

How do you synchronize with Android?

I am asking these questions to get a better understanding. I probably won't have time to investigate this myself.
Comment 2 promeneur 2013-06-23 05:29:09 UTC
Created attachment 81241 [details]
labels seen in kaddressbook editor

When you say "label", do you mean the TYPE in the TEL property of the vCard?

see in the kaddressbook editor the labels at the left of the fields to fill
Comment 3 promeneur 2013-06-23 05:31:29 UTC
Created attachment 81242 [details]
labels seen in kaddressbook view

When you say "label", do you mean the TYPE in the TEL property of the vCard?

see in the kaddressbook view the labels at the left of the values
Comment 4 promeneur 2013-06-23 05:45:40 UTC
Created attachment 81243 [details]
labels seen in vcard file

see the vcard file corresponding to the "TEST" card
Comment 5 promeneur 2013-06-23 05:57:26 UTC
there is another pb wich may lead to conflict

in the vcard file we see that it is a 3.0 vcard format

in syncevolution/sources/addressbbok/config.ini
we see

KDE Address Book = KDE Contacts = addressbook = contacts = kde-contacts
#     vCard 2.1 (default) = text/x-vcard
#     vCard 3.0 = text/vcard

the default format used by syncevolution is 2.1 and the format used by kaddressbook is 3.0

may be it would be better syncevolution use 3.0. no ?
Comment 6 promeneur 2013-06-23 07:18:27 UTC
Created attachment 81251 [details]
android contact editor

in android contact editor you see the label "Autre fax" after synchronizing from the pc
Comment 7 promeneur 2013-06-23 07:19:55 UTC
Created attachment 81252 [details]
android contact view

the view of the "TEST" card

you see there is no label for the fax
Comment 8 promeneur 2013-06-23 07:35:04 UTC
Created attachment 81253 [details]
the vcard after synchronizing from android

then i add a note in the android card of "TEST"
according to have synchronization of the card from android to kde

see the vcard file of "TEST" after sync from android to kde
Comment 9 promeneur 2013-06-23 07:37:43 UTC
Created attachment 81254 [details]
view of "TEST" card in kaddressbook after sync from android
Comment 10 promeneur 2013-06-23 07:46:36 UTC
then you see :

- the label "fax" in kaddressbook leads to <no label> in android contact
and "autre fax" in android contact editor

- if i change in android contact editor "Autre fax" to "Fax pro"
then this lead via sync to have "Fax professionnel" instead of "fax" in kaddressbook
Comment 11 Patrick Ohly 2013-06-23 18:33:02 UTC
(In reply to comment #4)
> Created attachment 81243 [details]
> labels seen in vcard file
> 
> see the vcard file corresponding to the "TEST" card

What I don't see in this example is the "personal fax" and "professional fax" that you mentioned earlier. What the example are normal business (TYPE=WORK) and private (TYPE=HOME) phone numbers, which, by default, are of TYPE=VOICE.

It is also not clear yet how you synchronize with Android.

It's not hard to strip the explicit "VOICE" flag before storing in Akonadi. This should solve problem 3, at least in the Android -> Akonadi direction. All it takes is someone with the time and interest to set up a test environment, do some minor changes to the source code and then write an "incoming script" similar to the one that already exists for EDS.

See akonadisyncsource.h and getSynthesisInfo():
        /*
         * Disable the default VCARD_BEFOREWRITE_SCRIPT_EVOLUTION.
         * If any KDE-specific transformations via such a script
         * are needed, it can be named here and then defined by appending
         * to the fragments.
         */
        info.m_beforeWriteScript = ""; // "$VCARD_BEFOREWRITE_SCRIPT_KDE;";
        // fragments.m_datatypes["VCARD_BEFOREWRITE_SCRIPT_KDE"] = "<macro name=\"VCARD_BEFOREWRITE_SCRIPT_KDE\"><![DATA[ ... ]]></macro>";

The corresponding script for EDS is in VCARD_BEFOREWRITE_SCRIPT_EVOLUTION.

(In reply to comment #5)
> there is another pb wich may lead to conflict
> 
> in the vcard file we see that it is a 3.0 vcard format
> 
> in syncevolution/sources/addressbbok/config.ini
> we see
> 
> KDE Address Book = KDE Contacts = addressbook = contacts = kde-contacts
> #     vCard 2.1 (default) = text/x-vcard
> #     vCard 3.0 = text/vcard
> 
> the default format used by syncevolution is 2.1 and the format used by
> kaddressbook is 3.0
> 
> may be it would be better syncevolution use 3.0. no ?

For exchanging data with Akonadi, vCard 3.0 is always used. The comment above refers to the format used when exchanging with a SyncML peer. In SyncML, vCard 2.1 often works better because vCard 3.0 is less common and some peers do not implement it properly. If a peer supports it, vCard 3.0 can be enabled. The peer templates already do that where appropriate.
Comment 12 promeneur 2013-06-25 08:52:38 UTC
about "TEST" the result of 
syncevolution --export - @default addressbook

BEGIN:VCARD
VERSION:3.0
UID:pas-id-51C843C100000070
X-EVOLUTION-FILE-AS:TEST\, test
PRODID:-//Synthesis AG//NONSGML SyncML Engine V3.4.0.47//EN
REV:2013-06-24T13:04:01Z
N:TEST;test;;;
FN:test TEST
TEL;TYPE=HOME,VOICE:01 23 45 67 89
TEL;TYPE=WORK,VOICE:23 45 67 89 01
TEL;TYPE=WORK,FAX:98 76 54 32 10
NOTE:Test note
X-FUNAMBOL-CHILDREN:
END:VCARD
Comment 13 promeneur 2013-06-25 09:04:10 UTC
from kaddressbook to android contact what we see :

- kaddressbook : "fax"
- kaddressbook editor : "fax"
- vcard file : TEL;TYPE=FAX
- syncevolution export : TEL;TYPE=FAX
- contact editor "Autre fax"
- contact : "nothing"

i change in contact "Autre fax" to " Fax professionnel"

then
i synchronize android contact to kaddressbook

from contact to kaddreessbook what we see :

- contact "Fax professionnel"
- contact editor "Fax professionnel"
- vcard file : TEL;TYPE=FAX;TYPE=WORK
- kaddressbook editor : "Fax professionnel"
- kaddressbook : "Fax professionnel"
Comment 14 promeneur 2013-06-25 09:21:56 UTC
now i know better the details of the procedure 

- everybody uses a neutral language which is vcard language
but each tools (contact , kaddressbook ) uses its own language to create a view
 
- contact editor knows "TEL;TYPE=FAX" and displays "Autre fax"
but contact does not know how to display "TEL;TYPE=FAX" !

- kaddressbook knows  how to display "TEL;TYPE=FAX;TYPE=WORK"
but kaddressbook does not offers to create an object "TEL;TYPE=FAX;TYPE=WORK" !

- syncevolution is neutral when communicating with others

my conclusion :

- syncevolution has no pb

- contact has a pb : it does no know what is "TEL;TYPE=FAX"

- kaddressbook editor has a pb : it does not offers to create a "TEL;TYPE=FAX;TYPE=WORK" or "TEL;TYPE=FAX;TYPE=HOME"
Comment 15 Patrick Ohly 2013-06-25 11:51:28 UTC
(In reply to comment #14)
> now i know better the details of the procedure 
> 
> - everybody uses a neutral language which is vcard language
> but each tools (contact , kaddressbook ) uses its own language to create a
> view
>  
> - contact editor knows "TEL;TYPE=FAX" and displays "Autre fax"
> but contact does not know how to display "TEL;TYPE=FAX" !
> 
> - kaddressbook knows  how to display "TEL;TYPE=FAX;TYPE=WORK"
> but kaddressbook does not offers to create an object
> "TEL;TYPE=FAX;TYPE=WORK" !
>
> - syncevolution is neutral when communicating with others
> 
> my conclusion :
> 
> - syncevolution has no pb

That depends. It is unfortunate that apps working with vCard have different interpretations of it. In an ideal world, SyncEvolution should only pass around vCards without having to care or know about such differences.

But we don't live in a perfect world, and therefore I do see it as SyncEvolution's role to translate between different vCard flavors.

The problem is that this needs to be done by someone, and I don't have the time to take care of another vCard flavor (KDE) and sync combination (KDE + Funambol + Android).

The bug is valid and I'll keep it open, but I'll leave it open for someone else to work on.
Comment 16 promeneur 2013-06-25 13:11:59 UTC
i sent bug reports to kde and google

https://bugs.kde.org/show_bug.cgi?id=321587

https://code.google.com/p/android/issues/detail?id=56985

google has just accepted it as an enhancement

i wait the answer of kde
Comment 17 promeneur 2013-06-25 15:10:22 UTC
kde have just answered : bad translation in French !

in english there is "home fax" and "work fax"

see here https://bugs.kde.org/show_bug.cgi?id=321587#c7
Comment 18 promeneur 2013-06-25 16:39:46 UTC
kde side will be fixed for kde 4.11
see
https://bugs.kde.org/show_bug.cgi?id=321587#c9
Comment 19 GitLab Migration User 2018-10-13 12:39:07 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/SyncEvolution/syncevolution/issues/17.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.