6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
8/14/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#6796] "add ... to My Address Book" problems based on composite name field
*
Your Email Address
*
Spam protection
Enter the letters below:
.__.. .. .. . __. | ||__|| ||\ |(__ |__|| ||/\|| \|.__)
Comment
> I wasn't sure if this was a Turba problem or an IMP problem. > > > > The "Add ... to my Address Book" button depends on the "name" field > definition for the source defined by $_prefs['add_source']. > > > > In Turba 2.2, SQL based address books have split the name field up > into it's component fields - first, last, middle, prefix, suffix, > etc.. The default version of "name" is a composite version of all of > those fields, though an abbreviated "first and last only" version is > given as an example in the comments. > > > > If you use the "full" version of the name field definition, "Add ... > to my Address Book" doesn't work, because the SQL it generates tries > to match too many things: > > > > SELECT object_id, owner_id, object_type, object_members, object_uid, > > object_firstname, object_lastname, object_middlenames, > > object_nameprefix, object_namesuffix, object_alias, object_bday, > > object_homestreet, object_homepob, object_homecity, > > object_homeprovince, object_homepostalcode, object_homecountry, > > object_workstreet, object_workpob, object_workcity, > > object_workprovince, object_workpostalcode, object_workcountry, > > object_tz, object_email, object_homephone, object_workphone, > > object_cellphone, object_fax, object_pager, object_title, object_role, > > object_company, object_category, object_notes, object_url, > > object_freebusyurl, object_pgppublickey, object_smimepublickey FROM > > turba_objects WHERE ( > > owner_id = 'liamr' AND ( > > ( > > (LOWER(object_nameprefix) LIKE LOWER('%Joe%') OR > > LOWER(object_nameprefix) LIKE LOWER('%User%')) > > AND (LOWER(object_firstname) LIKE LOWER('%Joe%') OR > LOWER(object_firstname) LIKE LOWER('%User%')) > > AND (LOWER(object_middlenames) LIKE LOWER('%Joe%') OR > > LOWER(object_middlenames) LIKE LOWER('%User%')) > > AND (LOWER(object_lastname) LIKE LOWER('%Joe%') OR > LOWER(object_lastname) LIKE LOWER('%User%')) > > AND (LOWER(object_namesuffix) LIKE > > LOWER('%Joe%') OR LOWER(object_namesuffix) LIKE LOWER('%User%')) > > ) AND LOWER(object_email) LIKE LOWER('%juser@example.edu%') > > ) > > ) > > > > I guess it's possible it might work with a name that had all the > components ("Mr. Joseph Xavier User III"), but his SQL won't ever > match when given a name only made up of a first and last name. > > > > Since it doesn't match, "Add ... to my Address Book" will allow you > to add the same address over and over again to your address book. > > > > If you use the shorter version of the composite name field (first and > last only), you can add an address once, and subsequent attempts are > met with a notices that the entry "Already Exists". > > > > Chuck thought it was a bug.. > > > > http://marc.info/?l=imp&m=121211283608734&w=2
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers