#1486377 closed Feature Patches (fixed)
extended addressbook patch
| Reported by: | bbeveridge | Owned by: | |
|---|---|---|---|
| Priority: | 5 | Milestone: | 0.6-beta |
| Component: | Addressbook | Version: | git-master |
| Severity: | normal | Keywords: | addressbook, extended |
| Cc: | osos@…, nysander@…, matt@…, rediculum0@… |
Description
Hi All,
Here is a patch to extend the current addressbook, it adds commonly used extra fields such as:
work_number
home_number
fax_number
mobile_number
title
company
work_address
home_address
note
it has been applied against revision 3183
it also has vcard import and export with these extra fields according to the vcard standard.
Currently it only has en_US labels
It also includes the modifications to all the initial and updates for SQL.
Attachments (7)
Change History (26)
Changed 4 years ago by bbeveridge
comment:1 Changed 4 years ago by osos
- Cc osos@… added
- Milestone changed from later to 0.4-beta
Thank you.
Working great here. Exactly what I have been waiting for.
comment:2 Changed 3 years ago by alec
- Milestone changed from 0.4-beta to 0.5-beta
comment:3 Changed 3 years ago by osos
Seems not to apply smoothly to 0.4-beta!
Alec: Any changes this could be added to 0.4-stable ?
At least I think the "note"-field should be added, to be able to smoothly convert from Squirrelmail addressbook.
comment:4 Changed 3 years ago by toddtrann
I went through the old patch, and applied all by hand to current svn trunk, and then made a new patch. Should now apply cleanly.
However, I did not test functionality, only updated patch.
Todd
comment:5 Changed 3 years ago by toddtrann
Now test results:
[OK] Click on contact, enter data into new fields, save form, view data
[OK] Click on contact again, change data, save, view data
[OK] Export contact that does not contain new fields
[Failed] Export contact with data in new fields (new data does not show up in vCard file??)
I could not test import, there were other errors not related to this patch.
Todd
Changed 3 years ago by toddtrann
comment:6 Changed 3 years ago by toddtrann
And finally with respect to LDAP, this works. Once I put in all the correct LDAP field names into the config file, I can save and view all of the new fields.
When you combine this patch with the patch from ticket #1486682 then you have drag and drop copying between address books working: database to LDAP, and also reverse. Works great, all fields were copied over.
Todd
Changed 3 years ago by toddtrann
comment:7 Changed 3 years ago by toddtrann
Sorry for multiple uploads, I checked out a fresh copy from svn and my previous patch would not apply, here's a better one against r3593/svn.
Note that vCard export still isn't working for me, another set of eyes on it would be good, I can't see the problem.
comment:8 Changed 3 years ago by nysander
- Cc nysander@… added
comment:9 Changed 3 years ago by mattrude
- Cc matt@… added
This patch seems to be working well on [d17a7fea]. I will be nice when it starts working with LDAP, but I'm sure that will happen soon.
comment:10 Changed 3 years ago by toddtrann
Matt, it is working with LDAP for me. Did you test it and its not working for you? Note that you have to fill in the blanks for the LDAP fields where the new data is stored in main.inc.php since I didn't put any default ones. I didn't think they were standardized enough.
comment:11 Changed 3 years ago by mattrude
Im sorry it is working, I just didn't fill in the config file. I am having a problem with the Fax field, but that may be my fault.
Here's my current config if this helps anyone.
{{
'name_field' => 'cn',
'email_field' => 'mail',
'surname_field' => 'sn',
'firstname_field' => 'givenName',
'work_number_field' => 'telephoneNumber',
'home_number_field' => 'homePhone',
'fax_number_field' => 'Fax',
'mobile_number_field' => 'mobile',
'title_field' => 'title',
'company_field' => 'o',
'work_address_field' => 'street',
'home_address_field' => 'homePostalAddress',
'note_field' => 'description',
}}
comment:12 Changed 3 years ago by rediculum
Check out #1487039 for inetorgperson LDAP patch in en_US and de_CH
comment:13 Changed 3 years ago by bagu
There is a problem with :
foreach ($this->rawLABEL? as $entry) {
if ($entrytype?[0] == "HOME"){
$this->home_address = $entry[0];
}
elseif ($entrytype?[0] == "WORK") {
$this->work_address = $entry[0];
}
}
foreach ($this->rawTEL? as $entry) {
if ($entrytype?[0] == "HOME"){
$this->home_number = $entry[0];
}
elseif ($entrytype?[0] == "WORK") {
$this->work_number = $entry[0];
}
elseif ($entrytype?[0] == "CELL") {
$this->mobile_number = $entry[0];
}
elseif ($entrytype?[0] == "FAX") {
$this->fax_number = $entry[0];
}
When export to vcard.
Many php errors happen (foreach get invalid argument)
comment:14 Changed 3 years ago by mattrude
- Cc matt@… removed
comment:15 Changed 3 years ago by mattrude
- Cc matt@… added
comment:16 Changed 2 years ago by bagu
When export to vcard, when there is é à or other character like this, the export stop and skip the end of the contact information.
Then it go to the next contact.
comment:17 Changed 2 years ago by thomasb
- Resolution set to fixed
- Status changed from new to closed
Full featured address book available since [0501b637]. It's not based on this patch but should satisfy the request.
comment:18 Changed 2 years ago by bagu
In [0501b637] i don't see the ability to specify a work phone number and a home phone number (same for adress)
Changed 2 years ago by rediculum
RFC 2798 patch for LDAP inetorgperson compatibility. RC v.0.5 or higher
comment:19 Changed 2 years ago by rediculum
- Cc rediculum0@… added

extended_addressbook patch