karimsacre / google-shared-contacts-client

Automatically exported from code.google.com/p/google-shared-contacts-client
Apache License 2.0
0 stars 0 forks source link

No Department Exported? #29

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

Great tool, but I have come accoss two minor problems which I've had a go at 
fixing, but I'm not too good with python....

1; The two output fields "Company" and "Job Title" seem to output the same 
field from within Google contacts. The field in Google Contacts is named "Job 
Title".

2; The field "Department" is not output? How can I add this to your script?

Many thanks,

Eddy

Original issue reported on code.google.com by e.hart...@sheffield.ac.uk on 8 Jan 2012 at 8:02

GoogleCodeExporter commented 8 years ago
I can see that point one has been resolved in another bug report, but point 2 
has not been resolved?

Does anyone have any ideas on this please?

Many thanks,

Eddy

Original comment by ehartl...@gmail.com on 24 Feb 2013 at 1:36

GoogleCodeExporter commented 8 years ago
Feeding off the info in the bug ""Company" overwritten by "Job Title" on 
import" I have now solved this by adding to the following sections:

    export_fields = [
        'Action',
        'ID',
        'Name',
        'Company',
        'Job Title',
        'Department',
        'Notes',
      ]

And

    if contact_entry.organization:
      AddField('Company', contact_entry.organization.name, 'text')
      AddField('Job Title', contact_entry.organization.title, 'text')
      AddField('Department', contact_entry.organization.department, 'text')

Original comment by ehartl...@gmail.com on 24 Feb 2013 at 2:18