Summary: | CSV import won't import home locality | ||
---|---|---|---|
Product: | [Unmaintained] kab3 | Reporter: | Oliver Waddell <oliver> |
Component: | general | Assignee: | Tobias Koenig <tokoe> |
Status: | RESOLVED UNMAINTAINED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Oliver Waddell
2005-11-24 00:47:40 UTC
Can you please provide an example CSV file ? Hi Cp Hennessy
I don't have time to do that right now (and I don't want my personal
addressen in the bugs-database).
But I've a little addition to my report: the location of the business
location is assigned to the home location in the csv import data.
Greetings,
Oliver
> ------- Additional Comments From cp.hennessy iname com 2005-12-03 20:33 -------
> Can you please provide an example CSV file ?
On Sun, Dec 11, 2005 at 10:34:58PM -0000, Oliver Waddell wrote: > Hi Cp Hennessy Hi Oliver, > But I've a little addition to my report: the location of the business > location is assigned to the home location in the csv import data. Well, so when there is no correct assignment, the data won't be imported properly of course... Did you use a predefined assignment (template)? Ciao, Tobias SVN commit 630659 by tokoe: Import phonenumbers and address data correctly when using Field::setValue() BUG:116980 M +129 -0 field.src.cpp --- branches/KDE/3.5/kdelibs/kabc/scripts/field.src.cpp #630658:630659 @@ -23,6 +23,7 @@ #include <kglobal.h> #include "field.h" +#include "address.h" using namespace KABC; @@ -216,10 +217,138 @@ { switch ( mImpl->fieldId() ) { --CASESETVALUE-- + case FieldImpl::MobilePhone: + { + PhoneNumber number = a.phoneNumber( PhoneNumber::Cell ); + number.setNumber( value ); + a.insertPhoneNumber( number ); + return true; + } + case FieldImpl::HomeFax: + { + PhoneNumber number = a.phoneNumber( PhoneNumber::Home | PhoneNumber::Fax ); + number.setNumber( value ); + a.insertPhoneNumber( number ); + return true; + } + case FieldImpl::BusinessFax: + { + PhoneNumber number = a.phoneNumber( PhoneNumber::Work | PhoneNumber::Fax ); + number.setNumber( value ); + a.insertPhoneNumber( number ); + return true; + } + case FieldImpl::CarPhone: + { + PhoneNumber number = a.phoneNumber( PhoneNumber::Car ); + number.setNumber( value ); + a.insertPhoneNumber( number ); + return true; + } + case FieldImpl::Isdn: + { + PhoneNumber number = a.phoneNumber( PhoneNumber::Isdn ); + number.setNumber( value ); + a.insertPhoneNumber( number ); + return true; + } + case FieldImpl::Pager: + { + PhoneNumber number = a.phoneNumber( PhoneNumber::Pager ); + number.setNumber( value ); + a.insertPhoneNumber( number ); + return true; + } + case FieldImpl::HomeAddressStreet: + { + KABC::Address address = a.address( Address::Home ); + address.setStreet( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::HomeAddressLocality: + { + KABC::Address address = a.address( Address::Home ); + address.setLocality( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::HomeAddressRegion: + { + KABC::Address address = a.address( Address::Home ); + address.setRegion( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::HomeAddressPostalCode: + { + KABC::Address address = a.address( Address::Home ); + address.setPostalCode( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::HomeAddressCountry: + { + KABC::Address address = a.address( Address::Home ); + address.setCountry( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::HomeAddressLabel: + { + KABC::Address address = a.address( Address::Home ); + address.setLabel( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::BusinessAddressStreet: + { + KABC::Address address = a.address( Address::Work ); + address.setStreet( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::BusinessAddressLocality: + { + KABC::Address address = a.address( Address::Work ); + address.setLocality( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::BusinessAddressRegion: + { + KABC::Address address = a.address( Address::Work ); + address.setRegion( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::BusinessAddressPostalCode: + { + KABC::Address address = a.address( Address::Work ); + address.setPostalCode( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::BusinessAddressCountry: + { + KABC::Address address = a.address( Address::Work ); + address.setCountry( value ); + a.insertAddress( address ); + return true; + } + case FieldImpl::BusinessAddressLabel: + { + KABC::Address address = a.address( Address::Work ); + address.setLabel( value ); + a.insertAddress( address ); + return true; + } case FieldImpl::Birthday: a.setBirthday( QDate::fromString( value, Qt::ISODate ) ); + return true; case FieldImpl::CustomField: a.insertCustom( mImpl->app(), mImpl->key(), value ); + return true; default: return false; } The development of the old KAddressBook will be discontinued for KDE 4.4. Since the new application has the same name, but a completly new code base we close all bug reports against the old version and ask the submitters to resend there reports against the new product. |