5.2.0-git
2014-07-23

[#10913] Autocompleter uses "email"-field only
Summary Autocompleter uses "email"-field only
Queue Horde Base
Queue Version Git master
Type Enhancement
State Feedback
Priority 1. Low
Owners
Requester michael.groene (at) zel (dot) uni-hannover (dot) de
Created 2012-01-10 (925 days ago)
Due
Updated 2014-01-07 (197 days ago)
Assigned
Resolved
Milestone
Patch No

History
2014-01-07 23:50:57 Michael Slusarz Comment #4
Queue ⇒ Horde Base
Version ⇒ Git master
Reply to this comment
This is a Horde-wide setting, not an IMP setting (in 
Horde_Core_Ajax_Imple_ContactAutoCompleter).
2013-11-18 14:30:28 registrations (at) baruchgreen (dot) net Comment #3 Reply to this comment
In the current versions of Imp/Turba (6.1.5 and 4.1.3, respectively) 
this is quite easy to fix.  Go to line 67 of ContactAutocompleter.php

                 'returnFields' => array('email', 'name'),

And simply insert the additional email fields from your turba 
backends.local.php into the array between 'email' and 'name'.  For me 
it ends up being:

                 'returnFields' => array('email', 'workEmail', 
'homeEmail', 'name'),

Works like a charm.

-- Seth Green


2012-01-24 15:12:00 Jan Schneider Version ⇒ Git master
 
2012-01-24 15:11:46 Jan Schneider Priority ⇒ 1. Low
State ⇒ Feedback
Type ⇒ Enhancement
 
2012-01-24 15:11:31 Jan Schneider Comment #2 Reply to this comment
I think this should be mentioned somewhere in documentation, is it?
Patch?
Or maybe even better, the autocompleter would accept different 
mail-fields, e.g. all fields, marked as type="email" in 
attributes.php?
Sounds good.
2012-01-10 12:19:02 michael (dot) groene (at) zel (dot) uni-hannover (dot) de Comment #1
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Queue ⇒ IMP
Summary ⇒ Autocompleter uses "email"-field only
Type ⇒ Bug
Priority ⇒ 1. Low
Reply to this comment
I was irritated by the results of the Autocompleter in IMP once more...

Our global addressbook contains just work-mailaddresses, so I 
configured turbas database-backend accordingly.

It was like this in backends.local.php:
** snip **
         'homePostalCode' => 'postcode',
         'workEmail' => 'email_zew',
         'workPhone' => 'phone_zew',
** snip **
         'search'=>array('name','workEmail'),
** snip **

Now I found out the reason, why the autocompleter completely ignored 
this source (lib/imp/Ajax/Imple/ContactAutoCompleter.php:46ff):
             foreach ($sparams['fields'] as $val) {
                 array_map('strtolower', $val);
                 sort($val);
                 if ($val != array('email', 'name')) {
                     $success = false;
                     break;
                 }
             }

So at least the keys email and name have to be present in source.
I think this should be mentioned somewhere in documentation, is it?
Or maybe even better, the autocompleter would accept different 
mail-fields, e.g. all fields, marked as type="email" in attributes.php?