<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>&quot;add ... to My Address Book&quot; problems based on composite name field </title> 
  <pubDate>Fri, 10 Apr 2026 09:21:00 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/6796</link> 
  <atom:link rel="self" type="application/rss+xml" title="&quot;add ... to My Address Book&quot; problems based on composite name field " href="https://bugs.horde.org/ticket/6796/rss" /> 
  <description>&quot;add ... to My Address Book&quot; problems based on composite name field </description> 
 
   
   
  <item> 
   <title>I wasn&#039;t sure if this was a Turba problem or an IMP problem.</title> 
   <description>I wasn&#039;t sure if this was a Turba problem or an IMP problem.



The &quot;Add ... to my Address Book&quot; button depends on the &quot;name&quot; field definition for the source defined by $_prefs[&#039;add_source&#039;]. 



In Turba 2.2, SQL based address books have split the name field up into it&#039;s component fields - first, last, middle, prefix, suffix, etc..  The default version of &quot;name&quot; is a composite version of all of those fields, though an abbreviated &quot;first and last only&quot; version is given as an example in the comments.



If you use the &quot;full&quot; version of the name field definition, &quot;Add ... to my Address Book&quot; doesn&#039;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 = &#039;liamr&#039;    AND (

        (

            (LOWER(object_nameprefix) LIKE LOWER(&#039;%Joe%&#039;) OR

LOWER(object_nameprefix) LIKE LOWER(&#039;%User%&#039;))

            AND (LOWER(object_firstname) LIKE LOWER(&#039;%Joe%&#039;) OR LOWER(object_firstname) LIKE LOWER(&#039;%User%&#039;))

            AND (LOWER(object_middlenames) LIKE LOWER(&#039;%Joe%&#039;) OR

LOWER(object_middlenames) LIKE LOWER(&#039;%User%&#039;))

            AND (LOWER(object_lastname) LIKE LOWER(&#039;%Joe%&#039;) OR LOWER(object_lastname) LIKE LOWER(&#039;%User%&#039;))

            AND (LOWER(object_namesuffix) LIKE

LOWER(&#039;%Joe%&#039;) OR LOWER(object_namesuffix) LIKE LOWER(&#039;%User%&#039;))

        )    AND LOWER(object_email) LIKE LOWER(&#039;%juser@example.edu%&#039;)

    )

)



I guess it&#039;s possible it might work with a name that had all the components (&quot;Mr. Joseph Xavier User III&quot;), but his SQL won&#039;t ever match when given a name only made up of a first and last name.



Since it doesn&#039;t match, &quot;Add ... to my Address Book&quot; 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 &quot;Already Exists&quot;.



Chuck thought it was a bug..



http://marc.info/?l=imp&amp;m=121211283608734&amp;w=2</description> 
   <pubDate>Fri, 30 May 2008 14:08:40 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6796#t45697</link> 
  </item> 
   
  <item> 
   <title>...this is most definitely a Turba issue.</title> 
   <description>...this is most definitely a Turba issue.</description> 
   <pubDate>Sat, 14 Jun 2008 19:42:01 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6796#t46473</link> 
  </item> 
   
  <item> 
   <title>This patch fixes the issue. It&#039;s tested with SQL driver, but</title> 
   <description>This patch fixes the issue. It&#039;s tested with SQL driver, but I would appreciate feedback/testing with other drivers before it gets committed.



Basically, adds an additional check on each of the individual fields the composite field is composed of that allows that field to be empty.  The SQL driver was patched to turn a check for &#039;=&#039; or &#039;LIKE&#039; against an empty string to also include a check for IS NULL.</description> 
   <pubDate>Sun, 15 Jun 2008 18:55:24 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6796#t46512</link> 
  </item> 
   
  <item> 
   <title>Works okay for me.</title> 
   <description>Works okay for me.</description> 
   <pubDate>Mon, 16 Jun 2008 17:17:39 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6796#t46576</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in CVS for this ticket:

http://cvs.h</title> 
   <description>Changes have been made in CVS for this ticket:

http://cvs.horde.org/diff.php/turba/lib/Driver.php?r1=1.198&amp;r2=1.199&amp;ty=u
http://cvs.horde.org/diff.php/turba/lib/Driver/sql.php?r1=1.114&amp;r2=1.115&amp;ty=u</description> 
   <pubDate>Mon, 16 Jun 2008 18:54:45 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6796#t46582</link> 
  </item> 
   
  <item> 
   <title>Fixed for Turba 2.2.2</title> 
   <description>Fixed for Turba 2.2.2</description> 
   <pubDate>Mon, 16 Jun 2008 18:58:15 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6796#t46583</link> 
  </item> 
   
  <item> 
   <title>This completely broke listing of all address book entries wh</title> 
   <description>This completely broke listing of all address book entries when not using a composite name field, e.g. in imp&#039;s address book popup or the clients listing in hermes. With these changes only contacts that don&#039;t have a name are listed.

To list all contacts of an address book, we search for an empty string &#039;&#039;.</description> 
   <pubDate>Mon, 23 Jun 2008 08:24:42 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6796#t46727</link> 
  </item> 
   
  <item> 
   <title>Reverted the &quot;fix&quot;...and I&#039;m currently hitting a wall regard</title> 
   <description>Reverted the &quot;fix&quot;...and I&#039;m currently hitting a wall regarding how to fix this cleanly.</description> 
   <pubDate>Mon, 23 Jun 2008 17:20:13 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6796#t46735</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in CVS for this ticket:

http://cvs.h</title> 
   <description>Changes have been made in CVS for this ticket:

http://cvs.horde.org/diff.php/turba/lib/Driver.php?r1=1.202&amp;r2=1.203&amp;ty=u
http://cvs.horde.org/diff.php/turba/lib/Driver/sql.php?r1=1.116&amp;r2=1.117&amp;ty=u</description> 
   <pubDate>Sat, 05 Jul 2008 14:06:46 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6796#t47234</link> 
  </item> 
   
  <item> 
   <title>Committed a slightly different version and this seems to fix</title> 
   <description>Committed a slightly different version and this seems to fix the original issue and does not cause any issues with listing complete address books using the empty string.



Will wait for some feeback/other testing before merging.</description> 
   <pubDate>Sat, 05 Jul 2008 14:12:20 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6796#t47237</link> 
  </item> 
   
  <item> 
   <title>Merging, this has been operating fine for me for the past tw</title> 
   <description>Merging, this has been operating fine for me for the past two days.</description> 
   <pubDate>Sun, 06 Jul 2008 16:22:37 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6796#t47257</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
