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

History
01/24/2012 03:12:00 PM Jan Schneider Version ⇒ Git master
 
01/24/2012 03:11:46 PM Jan Schneider Priority ⇒ 1. Low
State ⇒ Feedback
Type ⇒ Enhancement
 
01/24/2012 03:11:31 PM 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.
01/10/2012 12:19:02 PM 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?