Summary | Autocompleter uses "email"-field only |
Queue | Horde Base |
Queue Version | Git master |
Type | Enhancement |
State | Resolved |
Priority | 1. Low |
Owners | mrubinsk (at) horde (dot) org |
Requester | michael.groene (at) zel (dot) uni-hannover (dot) de |
Created | 01/10/2012 (4923 days ago) |
Due | |
Updated | 10/20/2017 (2813 days ago) |
Assigned | |
Resolved | 07/21/2016 (3269 days ago) |
Milestone | |
Patch | No |
commit dfa16c1a1e8f714173520f5ab8f660396b616d52
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date: Thu, 21 Jul 2016 15:29:26 -0400
Add 'emailSearch' option to Turba_Api::search.
Ensures all available email type fields are included and returned
in search results. Done as part of Turba_Api::search in place of
an additional API method to provide a clean, BC, solution that falls
back gracefully to previous behavior. To be revisted in Horde 6.
See
Bug: 10913M lib/Api.php
https://github.com/horde/turba/commit/dfa16c1a1e8f714173520f5ab8f660396b616d52
State ⇒ Resolved
commit a708dbb6b667ab8238ac2d7e370270f2a0c064cd
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date: Thu Jul 21 14:41:21 2016 -0400
Add 'emailSearch' option to Turba_Api::search.
Ensures all available email type fields are included and returned
in search results. Done as part of Turba_Api::search in place of
an additional API method to provide a clean, BC, solution that falls
back gracefully to previous behavior. To be revisted in Horde 6.
See
Bug: 10913turba/lib/Api.php | 26 ++++++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)
http://github.com/horde/horde/commit/a708dbb6b667ab8238ac2d7e370270f2a0c064cd
commit 0cdf283b60733fbbd943665b30247e1369e53106
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date: Thu Jul 21 14:46:49 2016 -0400
Use the 'emailSearch' if it's available.
See
Bug: 10913framework/Core/lib/Horde/Core/Ajax/Imple/ContactAutoCompleter.php | 3 ++-
imp/lib/Contacts.php | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
http://github.com/horde/horde/commit/0cdf283b60733fbbd943665b30247e1369e53106
commit 5973a65e66df21be6e4861c0b81fa840ad570693
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date: Thu Jul 21 14:41:21 2016 -0400
Add 'emailSearch' option to Turba_Api::search.
Ensures all available email type fields are included and returned
in search results. Done as part of Turba_Api::search in place of
an additional API method to provide a clean, BC, solution that falls
back gracefully to previous behavior. To be revisted in Horde 6.
See
Bug: 10913turba/lib/Api.php | 26 ++++++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)
http://github.com/horde/horde/commit/5973a65e66df21be6e4861c0b81fa840ad570693
#13945issue.But, does not.
-------------------------------------------------------------------------------------------------
Allow Turba_Api::getField to search any attribute of type 'email'.
Any email attribute present in the source's map and 'search' settings
will be considered. Fixes FB urls not being found for email addresses
not contained in 'email' field.
This was solved in commits on Sep 8th 2015 through commit
cd3595fb171969e8ba9a53fbc529bc2a657d4dd6
AND search when 'strict' fields are present.
Are the email fields of your source present in the 'search' parameter
of it's configuration in backends.local.php?
include all fields of type 'email' in it's search.
https://github.com/horde/horde/commit/cd3595fb171969e8ba9a53fbc529bc2a657d4dd6
doesn't find the free/busy URL for contacts specified by E-Mail anymore.
Steps:
1) patch Turba (horde/turba/lib/Api.php and horde/turba/lib/Turba.php)
2) ensure, that there is a valid address book entry with an e-mail
address "test@example.com" in email field
3) create an event an invite the contact test@example.com
With debug statements I saw, that $criterium is an array with the
element "test@example.com". But
$list = $sdriver->search($criterium, null, 'OR', array(), $strict ?
array_keys($criterium) : array());
in horde/turba/lib/Api.php doesn't find the free/busy URL.
include all fields of type 'email' in it's search.
https://github.com/horde/horde/commit/cd3595fb171969e8ba9a53fbc529bc2a657d4dd6
attached patch).
application providing the contacts/ API) scope and can't use anything
that requires knowledge of the application's configuration/internals.
That's why Michael S. indicated we need a specific email search API.
matching email address is workEmail or homeEmail. So at least one
additional function has to be fixed.
include all fields of type 'email' in it's search.
New Attachment: autocomplete-email.patch
- typing email addresses in "new message" form of IMP
- creating events and add attendees (no free/busy information is
found, if the email is only in homeEmail or workEmail
attached patch).
But Turba does not find the free/busy URL for contacts, where the
matching email address is workEmail or homeEmail. So at least one
additional function has to be fixed.
State ⇒ Accepted
users have to create separate address book entries for each email
address of one real person.
with. With our limited resources, no developer has not yet had time
devoted to it.
If this issue is important enough to you to be fixed, consider
sponsoring the work.
I use the three email fields predefined in
horde/turba/config/backends.local.php
$cfgSources['localsql']['search'] = array(
'name',
'email',
'homeEmail',
'workEmail',
);
homeEmail and workEmail values are completely ignored here:
- typing email addresses in "new message" form of IMP
- creating events and add attendees (no free/busy information is
found, if the email is only in homeEmail or workEmail
But homeEmail and workEmail searches work in Turba search.
I think, it's important to fix this issue. Otherwise many Horde users
have to create separate address book entries for each email address of
one real person.
#12480, but not really.In short... what we really need is an API method in Turba for plain
email search. Pass it a string, and it searches all e-mail fields
(and name fields, as an additional option). Returns only the e-mails
that match, not all entries.
This could all theoretically be done remotely ... but I've just spent
2 hours trying to implement this in IMP and realized that it makes no
sense. Since I'm trying to do things like grab the configuration file
from Turba and parse various fields (which is not documented in the
external application API). This is hackish at best, and will result
in duplicate code at worst since this common code needs to be
duplicated elsewhere (IMP is not going to use Horde_Core's
autocomplete code going forward for multiple reasons).
Version ⇒ Git master
Queue ⇒ Horde Base
Horde_Core_Ajax_Imple_ContactAutoCompleter).
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
State ⇒ Feedback
Priority ⇒ 1. Low
mail-fields, e.g. all fields, marked as type="email" in
attributes.php?
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Summary ⇒ Autocompleter uses "email"-field only
Type ⇒ Bug
Queue ⇒ IMP
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?