bmatthias / kolab-android

Automatically exported from code.google.com/p/kolab-android
Other
0 stars 0 forks source link

Contacts get messed up on the server on sync #50

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Add an contact in Horde
2. Sync to the phone once
3. Sync to the phone another time

What is the expected output? What do you see instead?
The contact should be in the Android addressbook as entered in Horde (or at 
least its supported fields). The server side item should be unchanged as the 
contact has not been edited on the phone.
Instead the phone changes the server side entry on the second sync and messes 
up a lot of fields.

What version of the product are you using? On what operating system?
KolabDroid 0.7 on an Android Virtual Device with Android 2.1.

Please provide any additional information below.
I attached the XML of the addressbook entry as it was directly after entering 
in Horde and as it was after the second sync from the phone.

Original issue reported on code.google.com by chrill...@googlemail.com on 26 May 2011 at 11:49

Attachments:

GoogleCodeExporter commented 8 years ago
This is exactly the behaviour I mentioned earlier in one of my emails when I 
was proposing to get more reliable address sync. This problem only occurs with 
contacts having a postal address! The sync from server to phone seems to be OK. 
But for some reason the contacts get synced back to the server (even if not 
changed on the phone) and normally the phone numbers (and maybe other fields) 
get erased on the server.

I think the reason for the unwanted sync from phone to server is located in the 
method "private Contact loadItem(Cursor personCursor) throws SyncException" in 
src/at/dasz/KolabDroid/ContactsContract/SyncContactsHandler.java. The method 
loads all the necessary fields except addresses which lead to a different hash 
code of the Contact object. That then triggers the unwanted sync.

I don't know why then the contact on the server gets messed up...

Original comment by must...@gmx.de on 26 May 2011 at 1:17

GoogleCodeExporter commented 8 years ago
Messing up the original document could be a result of mixing up both writeXml 
Methods. I'll have an look at it.

Original comment by arthur.z...@gmail.com on 27 May 2011 at 7:33

GoogleCodeExporter commented 8 years ago

Original comment by arthur.z...@gmail.com on 27 May 2011 at 2:57

GoogleCodeExporter commented 8 years ago
Should be better now. Won't close until more testing have been done.

Version 0.8 DOES NOT SUPPORT POSTAL ADDRESSES! But it should be preserved.

Original comment by arthur.z...@gmail.com on 24 Jun 2011 at 8:26

GoogleCodeExporter commented 8 years ago
JUHU! Fixed! (in Version 0.8) Thanks for this very good example!

Original comment by arthur.z...@gmail.com on 28 Jun 2011 at 4:48