6.0.0-beta1
7/5/25

[#12192] ActiveSync: Country field is not synced
Summary ActiveSync: Country field is not synced
Queue Turba
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester thomas.jarosch (at) intra2net (dot) com
Created 04/18/2013 (4461 days ago)
Due
Updated 04/22/2013 (4457 days ago)
Assigned 04/18/2013 (4461 days ago)
Resolved 04/19/2013 (4460 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch Yes

History
04/22/2013 02:00:04 PM Thomas Jarosch Comment #8 Reply to this comment
This commit should do it...
yep, it did. Thanks!

I've backported it manually for me to FRAMEWORK_5_0, I want that new 
feature :)

04/19/2013 07:03:44 PM Michael Rubinsky Comment #7
Assigned to Michael Rubinsky
State ⇒ Resolved
Reply to this comment
This commit should do it...
04/19/2013 07:03:21 PM Git Commit Comment #6 Reply to this comment
Changes have been made in Git (master):

commit ab1d84d2492baf38fa2c2b3f227fe46f85e4f100
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Fri Apr 19 15:01:37 2013 -0400

     Support "free" country fields as well.

     If both free and non-free country fields are defined in a source,
     the "free" version will take precedence.

     Request: 12192

  turba/lib/Driver.php |   54 ++++++++++++++++++++++++++++++++++++-------------
  1 files changed, 39 insertions(+), 15 deletions(-)

http://git.horde.org/horde-git/-/commit/ab1d84d2492baf38fa2c2b3f227fe46f85e4f100
04/19/2013 01:30:42 PM Michael Rubinsky Comment #5 Reply to this comment
As far as I understand the code, the country field wasn't mapped 
before at all?
So this should be no problem.
It's mapped in the Turba_Driver#[to|from]ASContact() methods along 
with the other fields that require special handling and can't just be 
copied over in a loop. It needs to be converted to/from the ISO 
country codes.

If you want the free-form country fields to be supported as an option 
(and I agree it would be a good idea), we should decide which field to 
standardize on when sending/receiving from the sync client. We 
probably need to keep the iso fields to avoid them getting corrupted 
by non-iso names form the client. Then it's just a matter of detecting 
the field in use on the Turba side, and converting it if necessary 
to/from the iso names.
btw: You commited the patch file for this in 
2b9e0896111eb40b02324a827fc6177e2d6fa660
Jan fixed this later on.
Yes, I saw that.
You also commited the code changes accidentally together with the 
imaddress stuff. Though I don't mind getting the code applied :o)
*sigh* These 60-70 hour weeks are killing me. I wonder what it would 
feel like if I ever coded while I was not half asleep for a change. :)

Sorry, but I'll have to revert it until it's implemented as above :)
04/19/2013 07:16:44 AM Thomas Jarosch Comment #4 Reply to this comment
If somebody has defined both the [home|other|work]CountryFree field 
and the corresponding  [home|other|work]Country field then the later 
will overwrite the former. The non-free version is the ISO country 
code, not free text, and is converted to the ISO country name before 
being sent to the device.
As far as I understand the code, the country field wasn't mapped 
before at all?
So this should be no problem.

btw: You commited the patch file for this in 
2b9e0896111eb40b02324a827fc6177e2d6fa660
Jan fixed this later on. You also commited the code changes 
accidentally together with the imaddress stuff. Though I don't mind 
getting the code applied :o)

04/18/2013 04:49:57 PM Michael Rubinsky Comment #3
State ⇒ Feedback
Reply to this comment
If somebody has defined both the [home|other|work]CountryFree field 
and the corresponding  [home|other|work]Country field then the later 
will overwrite the former. The non-free version is the ISO country 
code, not free text, and is converted to the ISO country name before 
being sent to the device.

04/18/2013 10:30:04 AM Thomas Jarosch Comment #2
Patch ⇒ Yes
New Attachment: 0001-ActiveSync-Add-support-to-sync-the-country-fields-bu.patch Download
Reply to this comment
The patch to fix the issue.

04/18/2013 10:27:28 AM Thomas Jarosch Comment #1
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Queue ⇒ Turba
Summary ⇒ ActiveSync: Country field is not synced
Type ⇒ Bug
Reply to this comment
Hi,

attached patch adds support to sync the country fields.
I've tested the work and home country field.

Cheers,
Thomas

Saved Queries