<?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>Handling of composite fields during import</title> 
  <pubDate>Fri, 10 Apr 2026 09:50:16 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/6900</link> 
  <atom:link rel="self" type="application/rss+xml" title="Handling of composite fields during import" href="https://bugs.horde.org/ticket/6900/rss" /> 
  <description>Handling of composite fields during import</description> 
 
   
   
  <item> 
   <title>Hello together,



composite fields like &quot;name&quot; are not comp</title> 
   <description>Hello together,



composite fields like &quot;name&quot; are not computed properly f.e. during import.

Attached patch adds support for that. Note: It is intended

to use array_key_exists() in the code.



I&#039;ve seen there is &quot;similar&quot; code in the $driver-&gt;toHash() fucntion.

Maybe that can be remove if the new code gets in place.



Thomas

</description> 
   <pubDate>Wed, 11 Jun 2008 13:40:55 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6900#t46255</link> 
  </item> 
   
  <item> 
   <title>This patch causes the individual fields that compose the com</title> 
   <description>This patch causes the individual fields that compose the composite field to be overwritten with null values when the composite field is not being saved as a separate field in the backend storage...</description> 
   <pubDate>Wed, 11 Jun 2008 15:46:35 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6900#t46266</link> 
  </item> 
   
  <item> 
   <title>&gt; This patch causes the individual fields that compose the c</title> 
   <description>&gt; This patch causes the individual fields that compose the composite 

&gt; field to be overwritten with null values when the composite field is 

&gt; not being saved as a separate field in the backend storage...



Do you mean this part?



+                if (isset($hash[$mapfields])) {

+                    // Add composite field

+                    $hash[$key] = null;

+                    break;

+                }



It sets $hash[$key] which points to the composite field, not the individual part.

</description> 
   <pubDate>Wed, 11 Jun 2008 15:59:12 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6900#t46271</link> 
  </item> 
   
  <item> 
   <title>

&gt; It sets $hash[$key] which points to the composite field,</title> 
   <description>

&gt; It sets $hash[$key] which points to the composite field, not the 

&gt; individual part.





Yes, but follow the code in toDriverKeys() through some more and you&#039;ll see that if we are not saving the composite field to storage (in other words, if $this-&gt;map[$key][&#039;attribute&#039;] is empty) then the composite field is parsed out into it&#039;s individual fields, and then *those* values are saved to the $fields array when the arrays are merged.



To test this, just try to add a new contact in the &quot;out of the box&quot; localsql source using Turba&#039;s UI....it nulls out all the individual name fields.



</description> 
   <pubDate>Wed, 11 Jun 2008 16:08:22 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6900#t46273</link> 
  </item> 
   
  <item> 
   <title>&gt; Yes, but follow the code in toDriverKeys() through some mo</title> 
   <description>&gt; Yes, but follow the code in toDriverKeys() through some more and 

&gt; you&#039;ll see that if we are not saving the composite field to storage 

&gt; (in other words, if $this-&gt;map[$key][&#039;attribute&#039;] is empty) then the 

&gt; composite field is parsed out into it&#039;s individual fields, and then 

&gt; *those* values are saved to the $fields array when the arrays are 

&gt; merged.



Thanks, you are right, I didn&#039;t notice that code path before.



Attached is an updated patch to fix this issue. I also updated

the comment to be more precise about it.

</description> 
   <pubDate>Wed, 11 Jun 2008 16:42:01 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6900#t46275</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.195&amp;r2=1.196&amp;ty=u</description> 
   <pubDate>Wed, 11 Jun 2008 17:32:44 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6900#t46277</link> 
  </item> 
   
  <item> 
   <title>Changed the order of the conditional checks to put the (expe</title> 
   <description>Changed the order of the conditional checks to put the (expensive) array_key_exists() call at the end....and committed, thanks!



I left the similar code in toHash() since I&#039;m not sure off the top of my head if any other code paths would be affected.</description> 
   <pubDate>Wed, 11 Jun 2008 17:35:28 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6900#t46278</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.57.2.58&amp;r2=1.57.2.59&amp;ty=u</description> 
   <pubDate>Wed, 11 Jun 2008 17:36:50 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6900#t46279</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
